Color

laika.theme.config.Color
See theColor companion object
sealed abstract class Color(val displayValue: String)

Represent a color value in a format compatible with CSS.

Use the constructors of the companion for creating instances.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def validate: Option[String]

Validates the color value, providing an error message if invalid, otherwise None.

Validates the color value, providing an error message if invalid, otherwise None.

Implementation note: future versions of the library, once based on Scala 3, will hopefully offer compile-time validation of color and length values. But we want to avoid a dependency on a library like refined which is based on Scala 2 macros which will not be supported in Scala 3.

Attributes

Concrete fields

val displayValue: String