Colour

final class Colour(val argbValue: Int) extends AnyVal with FillFacet with ElemInt1

The argbValue must start with 0xFF if the default full opacity is required. So 0xFFFF0000 gives full opacity Red

Companion:
object
trait ElemInt1
trait ElemIntN
trait SpecialT
trait FillFacet
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def alpha: Int
override def attribs: Arr[XmlAtt]
Definition Classes
def blue: Int
def blueGl: Float
def canEqual(a: Any): Boolean

Returns the colour with the greatest contrast

Returns the colour with the greatest contrast

def contrast2(other: Colour): Colour

Returns the colour that most contrasts with the 2 colours. This is useful for text that is displayed across 2 background colours.

Returns the colour that most contrasts with the 2 colours. This is useful for text that is displayed across 2 background colours.

def darken(factor: Double): Colour

Darkens a colour by a defualt value of 2.

Darkens a colour by a defualt value of 2.

The fill attribute for SVG.

The fill attribute for SVG.

def green: Int
def greenGl: Float
def hasName: Boolean
def hexStr: String
@inline
final override def intValue: Int
Definition Classes
def lighten(factor: Double): Colour

Lightens a colour by a default value of 2

Lightens a colour by a default value of 2

def modAlpha(newAlpha: Int): Colour

Modifies the alpha value of the rgba Int

Modifies the alpha value of the rgba Int

def red: Int
def redGl: Float
def rgbHexStr: String
def setAlpha(newAlpha: Int): Colour
def svgStr: String
override def toString: String
Definition Classes
Any
def webStr: String

Inherited methods

@inline
def int1: Int
Inherited from:
ElemInt1

Concrete fields

val argbValue: Int