CPColor

object CPColor

Companion object contains utility functions and color constants.

Companion:
class
Source:
CPColor.scala
trait Product
trait Mirror
class Object
trait Matchable
class Any
CPColor.type

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

def apply(rgb: String): CPColor

Creates new color with this RGB string value.

Creates new color with this RGB string value.

Value parameters:
rgb

RGB value.

Example:
CPColor("0x1212ef")
CPColor("123123")
Source:
CPColor.scala
def apply(rgb: Int): CPColor

Creates new color with this RGB value.

Creates new color with this RGB value.

Value parameters:
rgb

RGB value.

Source:
CPColor.scala
def fromHSB(hue: Float, saturation: Float, brightness: Float): CPColor

Creates new color with given hue, saturation and brightness values. Each value must be in [0, 1] range.

Creates new color with given hue, saturation and brightness values. Each value must be in [0, 1] range.

Value parameters:
brightness

Brightness value in [0,1] range.

hue

Hue value in [0,1] range.

saturation

Saturation value in [0,1] range.

Source:
CPColor.scala
def gradientFun(c1: CPColor, c2: CPColor, steps: Int): () => CPColor

Creates function for gradient color between two given colors.

Creates function for gradient color between two given colors.

Value parameters:
c1

Color 1.

c2

Color 2.

steps

How many step of gradients between color 1 and color 2 to generate.

Source:
CPColor.scala
def gradientSeq(c1: CPColor, c2: CPColor, steps: Int): Seq[CPColor]

Creates sequence of gradient colors between two given colors.

Creates sequence of gradient colors between two given colors.

Value parameters:
c1

Color 1.

c2

Color 2.

steps

How many step of gradients between color 1 and color 2 to generate.

Source:
CPColor.scala
def mixture(c1: CPColor, c2: CPColor, balance: Float): CPColor

Gets a new color that is a mixture between given two colors with specified balance.

Gets a new color that is a mixture between given two colors with specified balance.

Value parameters:
balance

Mixture balance. Value must be in [0,1] range. Value 0 means that color c1 will be 100% of the mixture, value 1 means that color c2 will be 100% of the mixture.

c1

First color to mix.

c2

Second color to mix.

Source:
CPColor.scala

Concrete fields

final val CS_X11_ALL: Seq[CPColor]
final val CS_X11_BLUES: Seq[CPColor]
final val CS_X11_BROWNS: Seq[CPColor]
final val CS_X11_CYANS: Seq[CPColor]
final val CS_X11_GRAYS: Seq[CPColor]
final val CS_X11_GREENS: Seq[CPColor]
final val CS_X11_ORANGES: Seq[CPColor]
final val CS_X11_PINKS: Seq[CPColor]
final val CS_X11_PURPLES: Seq[CPColor]
final val CS_X11_REDS: Seq[CPColor]
final val CS_X11_WHITES: Seq[CPColor]
final val CS_X11_YELLOWS: Seq[CPColor]
final val CS_XTERM_ALL: Seq[CPColor]
final val C_AQUA: CPColor
final val C_BLACK: CPColor
final val C_BLUE: CPColor
final val C_BLUE1: CPColor
final val C_BLUE3: CPColor
final val C_BLUE31: CPColor
final val C_CYAN1: CPColor
final val C_CYAN2: CPColor
final val C_CYAN3: CPColor
final val C_GOLD1: CPColor
final val C_GOLD3: CPColor
final val C_GOLD3A: CPColor
final val C_GRAY0: CPColor
final val C_GRAY1: CPColor
final val C_GRAY10: CPColor
final val C_GRAY11: CPColor
final val C_GRAY12: CPColor
final val C_GRAY13: CPColor
final val C_GRAY14: CPColor
final val C_GRAY15: CPColor
final val C_GRAY16: CPColor
final val C_GRAY17: CPColor
final val C_GRAY18: CPColor
final val C_GRAY19: CPColor
final val C_GRAY1A: CPColor
final val C_GRAY1B: CPColor
final val C_GRAY1C: CPColor
final val C_GRAY1D: CPColor
final val C_GRAY1E: CPColor
final val C_GRAY1F: CPColor
final val C_GRAY2: CPColor
final val C_GRAY3: CPColor
final val C_GRAY4: CPColor
final val C_GRAY5: CPColor
final val C_GRAY6: CPColor
final val C_GRAY7: CPColor
final val C_GRAY8: CPColor
final val C_GRAY9: CPColor
final val C_GRAY_A: CPColor
final val C_GRAY_B: CPColor
final val C_GRAY_C: CPColor
final val C_GRAY_D: CPColor
final val C_GRAY_E: CPColor
final val C_GRAY_F: CPColor
final val C_GREEN: CPColor
final val C_GREEN1: CPColor
final val C_GREEN3: CPColor
final val C_GREEN4: CPColor
final val C_GREY: CPColor
final val C_GREY0: CPColor
final val C_GREY11: CPColor
final val C_GREY15: CPColor
final val C_GREY19: CPColor
final val C_GREY23: CPColor
final val C_GREY27: CPColor
final val C_GREY3: CPColor
final val C_GREY30: CPColor
final val C_GREY35: CPColor
final val C_GREY37: CPColor
final val C_GREY39: CPColor
final val C_GREY42: CPColor
final val C_GREY46: CPColor
final val C_GREY50: CPColor
final val C_GREY53: CPColor
final val C_GREY54: CPColor
final val C_GREY58: CPColor
final val C_GREY62: CPColor
final val C_GREY63: CPColor
final val C_GREY66: CPColor
final val C_GREY69: CPColor
final val C_GREY7: CPColor
final val C_GREY70: CPColor
final val C_GREY74: CPColor
final val C_GREY78: CPColor
final val C_GREY82: CPColor
final val C_GREY84: CPColor
final val C_GREY85: CPColor
final val C_GREY89: CPColor
final val C_GREY93: CPColor
final val C_KHAKI1: CPColor
final val C_KHAKI3: CPColor
final val C_LIME: CPColor
final val C_MAROON: CPColor
final val C_NAVY: CPColor
final val C_OLIVE: CPColor
final val C_ORCHID: CPColor
final val C_PINK1: CPColor
final val C_PINK3: CPColor
final val C_PLUM1: CPColor
final val C_PLUM2: CPColor
final val C_PLUM3: CPColor
final val C_PLUM4: CPColor
final val C_PURPLE: CPColor
final val C_RED: CPColor
final val C_RED1: CPColor
final val C_RED3: CPColor
final val C_RED3A: CPColor
final val C_SILVER: CPColor
final val C_SYS_GROUP: Seq[CPColor]
final val C_TAN: CPColor
final val C_TEAL: CPColor
final val C_VIOLET: CPColor
final val C_WHEAT1: CPColor
final val C_WHEAT4: CPColor
final val C_WHITE: CPColor
final val C_X11_GROUPS: Seq[Seq[CPColor]]
final val C_YELLOW: CPColor