Colour

com.alecdorrington.annotatedtextformat.dom.Colour$package.Colour
object Colour

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Colour.type

Members list

Value members

Concrete methods

def apply(css: String): Colour

The colour that CSS writes as css, as #14b8a6, teal, rgb(20 184 166 / 50%) or var(--critic); or else the colour of the text, currentcolor, if css is not one of those forms.

The colour that CSS writes as css, as #14b8a6, teal, rgb(20 184 166 / 50%) or var(--critic); or else the colour of the text, currentcolor, if css is not one of those forms.

Attributes

def parse(css: String): Option[Colour]

The colour that CSS writes as css, if it is one of the forms of a colour: a hex colour; a function of a colour space, as rgb(...) or hsl(...), of its numbers, with units or none; a named colour or a system colour; or a custom property, as var(--name), with a colour to fall back on, if any. Where the browser can say, as by CSS.supports, whatever it takes for a colour is one too, as color-mix(...).

The colour that CSS writes as css, if it is one of the forms of a colour: a hex colour; a function of a colour space, as rgb(...) or hsl(...), of its numbers, with units or none; a named colour or a system colour; or a custom property, as var(--name), with a colour to fall back on, if any. Where the browser can say, as by CSS.supports, whatever it takes for a colour is one too, as color-mix(...).

Attributes

Concrete fields

val text: Colour

The colour of the text.

The colour of the text.

Attributes

Extensions

Extensions

extension (colour: Colour)
def css: String

It, as CSS writes it.

It, as CSS writes it.

Attributes

def faded(share: Double): String

It, with only share of its opacity, from 0 to 1, to a tenth of a percent, written alike on the JVM and in JavaScript, which would write 20.0 as 20.

It, with only share of its opacity, from 0 to 1, to a tenth of a percent, written alike on the JVM and in JavaScript, which would write 20.0 as 20.

Attributes