Documentation
¶
Overview ¶
Package xcolor implements Red, RedGreen, and RGB color models matching the core image/color interface.
Note that there are good reasons these color types aren't in the core image.color package. The native color types may have optimized fast-paths for many use cases.
This package is a tradeoff of these optimizations against lower memory usage. This package is intended to be used in computer graphics (e.g. OpenGL) where images are uploaded to the GPU in a specific format (such as GL_R, GL_RG, or GL_RGB) and we don't care about the performance of native Go image manipulation.
OpenGL® and the oval logo are trademarks or registered trademarks of Hewlett Packard Enterprise in the United States and/or other countries worldwide.
Package Information ¶
License: BSD-3-Clause (see LICENSE.txt)
Stable: yes
For more information, documentation, source code, examples, support, links, etc. please see https://www.tawesoft.co.uk/go and https://www.tawesoft.co.uk/go/ximage/xcolor
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RGBModel color.Model = color.ModelFunc(rgbModel)
var RGModel color.Model = color.ModelFunc(func(c color.Color) color.Color { if _, ok := c.(color.RGBA); ok { return c } r, g, _, _ := c.RGBA() return RG{uint8(r >> 8), uint8(g >> 8)} })
var RedModel color.Model = color.ModelFunc(redModel)
Functions ¶
This section is empty.