rafraser/elm-lospec/1.1.0

NOTE: the latest version is 2.0.0

Palette

The Palette type and some useful getters.

Definition

type Palette

The core type for working with Lospec palettes.

Note that this is an opaque type - see the rest of the functions in this file for ways to work with these

createPalette : String -> List Color -> List String -> Maybe String -> String -> Palette

Create a palette from some basic properties

If you're looking at this module, you're probably here for the palette list - in which case this won't be much use to you

Getters

getTitle : Palette -> String

Get the title of a palette

getColors : Palette -> List Color

Get the title of a palette

getTags : Palette -> List String

Get all tags of a palette

While some effort has been taken to keep tags consistent, since these are freely input by authors on Lospec there is no guarantee that there will be a lot of consistency.

getAuthorName : Palette -> Maybe String

Get the name of the creator of a palette

Not all palettes have author names. Some palettes have different formatting for author names. If you're attributing a palette creator, I'd recommend linking to the Lospec palette page instead.

getUrl : Palette -> String

Get the Lospec URL for a palette

If you're specifically using a palette somewhere, show the author some love and link back to it!