Fledex.Color.Names (fledex v0.7.0)
View SourceThis module is a bridge between color name modules and the Fledex.Color
protocol. It uses the Fledex.Config to know about the configured colors
Summary
Guards
Checks whether the argument is a valid color name.
Functions
Get a detailed list of all the colors that have been configured
Retrieve information about the color with the given name
get a list of all the color names that are currently configured.
Guards
Functions
@spec colors() :: [Fledex.Color.Names.Types.color_struct_t()]
Get a detailed list of all the colors that have been configured
@spec info(name :: atom(), what :: atom()) :: nil | Fledex.Color.Names.Types.color_vals_t() | any()
Retrieve information about the color with the given name
See Fledex.Color.Names.Interface for more details
@spec names() :: [Fledex.Color.Names.Types.color_name_t()]
get a list of all the color names that are currently configured.
Contrary to normal color modules, you can't use the color name atom as a
function name. You still can retrieve the information through info/1
and info/2. Alternatively you need to ensure that the configured color
modules are imported.
Caution
When importing color modules, you have to be careful to only import those
functions that do not overlap. You can call Fledex.Config.configured_color_modules/0 to get
the list of modules and the colors that should be imported.