Fledex.Color.KinoRender (fledex v0.7.0)
View SourceThis module implements a KinoRender that converts a Fledex color to a markdown
representation that can be used in a Livebook and allows nicer rendering of return
values. Just return an instance of this module
Fledex.Color.KinoRender.new([color1, color2])Take a look at this livebook.
Note
For the proper rendering to happen you need to ensure that the protocol
consolidation does not happen, by specifying the the consolidate_protocols: false
option to Mix.install, i.e.:
Mix.install(
[
{:fledex, "~>0.0.0"}
],
consolidate_protocols: false
)Summary
Guards
Guard to check that the value is within the provided bounds of a byte [0, 255]
Functions
Create a new KinoRender for the specified color
convert to a list of Fledex.Leds
Convert to markdown (i.e. a string)
Guards
Types
@type t() :: %Fledex.Color.KinoRender{colors: [Fledex.Color.Types.color()]}
Functions
@spec new(Fledex.Color.Types.color() | [Fledex.Color.Types.color()]) :: t()
Create a new KinoRender for the specified color
@spec to_leds(t()) :: Fledex.Leds.t()
convert to a list of Fledex.Leds
Convert to markdown (i.e. a string)