RGB.this

Construct a color from a string.

  1. this(const(C)[] str)
    struct RGB(string components_, ComponentType_, bool linear_ = false, RGBColorSpace colorSpace_ = RGBColorSpace.sRGB)
    @safe pure
    this
    (
    C
    )
    (
    const(C)[] str
    )
    if (
    isSomeChar!C
    )
    if (
    isNumeric!ComponentType_
    )
  2. this(ComponentType r, ComponentType g, ComponentType b, ComponentType a)
  3. this(ComponentType l, ComponentType a)
  4. this(ComponentType.IntType r, ComponentType.IntType g, ComponentType.IntType b, ComponentType.IntType a)
  5. this(ComponentType.IntType l, ComponentType.IntType a)

Examples

static assert(RGB8("#8000FF")  == RGB8(0x80,0x00,0xFF));
static assert(RGBA8("#908000FF") == RGBA8(0x80,0x00,0xFF,0x90));

Meta