- Classes
- Namespaces
- Interfaces
- Traits
- Index

Interface

# Imagine\Image\Palette\Color\ColorInterface

interface ColorInterface

## Constants

COLOR_RED |
COLOR_GREEN |
COLOR_BLUE |
COLOR_CYAN |
COLOR_MAGENTA |
COLOR_YELLOW |
COLOR_KEYLINE |
COLOR_GRAY |

## Methods

Integer | getValue(string $component) Return the value of one of the component. |
integer | getAlpha() Returns percentage of transparency of the color |
PaletteInterface | getPalette() Returns the palette attached to the current color |
ColorInterface | dissolve(integer $alpha) Returns a copy of current color, incrementing the alpha channel by the given amount |
ColorInterface | lighten(integer $shade) Returns a copy of the current color, lightened by the specified number of shades |
ColorInterface | darken(integer $shade) Returns a copy of the current color, darkened by the specified number of shades |
ColorInterface | grayscale() Returns a gray related to the current color |
Boolean | isOpaque() Checks if the current color is opaque |

## Details

###
at line 36
`public Integer getValue(string $component)`

Return the value of one of the component.

#### Parameters

string | $component | One of the ColorInterface::COLOR_* component

#### Return Value

Integer |

###
at line 43
`public integer getAlpha()`

Returns percentage of transparency of the color

#### Return Value

integer |

###
at line 50
`public PaletteInterface getPalette()`

Returns the palette attached to the current color

#### Return Value

PaletteInterface |

###
at line 60
`public ColorInterface dissolve(integer $alpha)`

Returns a copy of current color, incrementing the alpha channel by the given amount

#### Parameters

integer | $alpha |

#### Return Value

ColorInterface |

###
at line 70
`public ColorInterface lighten(integer $shade)`

Returns a copy of the current color, lightened by the specified number of shades

#### Parameters

integer | $shade |

#### Return Value

ColorInterface |

###
at line 80
`public ColorInterface darken(integer $shade)`

Returns a copy of the current color, darkened by the specified number of shades

#### Parameters

integer | $shade |

#### Return Value

ColorInterface |

###
at line 87
`public ColorInterface grayscale()`

Returns a gray related to the current color

#### Return Value

ColorInterface |

###
at line 94
`public Boolean isOpaque()`

Checks if the current color is opaque

#### Return Value

Boolean |