https://github.com/tmcdonell/colour-accelerate
Colour representations in Accelerate
https://github.com/tmcdonell/colour-accelerate
Last synced: about 1 year ago
JSON representation
Colour representations in Accelerate
- Host: GitHub
- URL: https://github.com/tmcdonell/colour-accelerate
- Owner: tmcdonell
- License: bsd-3-clause
- Created: 2016-04-08T01:55:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T15:29:15.000Z (almost 6 years ago)
- Last Synced: 2025-03-29T04:11:59.398Z (about 1 year ago)
- Language: Haskell
- Size: 192 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# colour-accelerate
[](https://github.com/tmcdonell/colour-accelerate/actions)
[](https://gitter.im/AccelerateHS/Lobby)
[](https://stackage.org/lts/package/colour-accelerate)
[](https://stackage.org/nightly/package/colour-accelerate)
[](https://hackage.haskell.org/package/colour-accelerate)
This package provides data types and operations for dealing with colours in
Accelerate. For details on Accelerate, refer to the [main
repository][accelerate].
Contributions and bug reports are welcome!
Please feel free to contact me through [GitHub][accelerate] or [gitter.im][gitter.im].
Example: Blur
-------------
| Test image | sRGB | RGB |
|:----------:|:----:|:---:|
| ![Test image][blocks] | ![sRGB linear][blur_srgb] | ![RGB non-linear][blur_rgb] |
The test image on the left is composed of blocks and bars of the primary and
secondary colours, arranged so that each colour is juxtaposed next to all
others, plus black and white.
The image in the centre is created by blurring the original with a 9x9 Gaussian
filter in the linear gamma sRGB space.
The image on the right is created by blurring with the same 9x9 Gaussian filter
in the standard non-linear RGB colour space. Note the dark regions separating
red from green and cyan, and blue from red and green; purple lines separate cyan
from red and magenta; green separates yellow from cyan. These regions are
artefacts produced by mixing colours in the RGB colour space.
The files to generate the test image and run the demonstration are in the
examples directory.
[blocks]: https://github.com/tmcdonell/colour-accelerate/raw/master/samples/blocks.bmp
[blur_srgb]: https://github.com/tmcdonell/colour-accelerate/raw/master/samples/blur_srgb.bmp
[blur_rgb]: https://github.com/tmcdonell/colour-accelerate/raw/master/samples/blur_rgb.bmp
[accelerate]: https://github.com/AccelerateHS/accelerate
[gitter.im]: https://gitter.im/AccelerateHS/Lobby