DCGs and helper predicates for parsing and coverting colours.
- author
- - James Cash
- colour(-Colour)// is det
- DCG for parsing a colour in one of the many formats supported by
Tailwind/Girouette -- a preset list of colours, rgb, rgba, hsl,
hsla.
- has_alpha(+Colour) is semidet
- Predicate that succeeds when
Colour
has an alpha component.
- colour_with_alpha(+Colour0, +Alpha, -Colour1) is semidet
- When
Colour0
is a colour without an alpha channel, unifies
Color1
with Colour0
but having the alpha value Alpha
.
- as_transparent(+Colour0, -Colour1) is det
- True when
Colour1
is Colour0
but with an alpha channel
specified.
- colour_css(+Colour, -CssStr) is det
- Unifies
CssStr
with the CSS string representation of Colour
.