diff options
| author | Martin Lehoux <martin@lehoux.net> | 2020-04-04 14:32:27 -0700 |
|---|---|---|
| committer | Martin Lehoux <martin@lehoux.net> | 2020-04-04 14:32:27 -0700 |
| commit | cf93fc792d70f95fe08f76e8449adeef76fa1686 (patch) | |
| tree | 44af9110da28eda98e2af3b906f4538d82a13f00 /color.go | |
| parent | fa4beda1fb62fbeb69ae2371dd47239b3f7ad3aa (diff) | |
feat - Basic Color
Diffstat (limited to 'color.go')
| -rw-r--r-- | color.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/color.go b/color.go new file mode 100644 index 0000000..ee81855 --- /dev/null +++ b/color.go @@ -0,0 +1,9 @@ +package main + +type Color struct { + r, g, b float64 +} + +func (color Color) ToPixel() Pixel { + return Pixel{int(color.r * 255), int(color.g * 255), int(color.b * 255)} +} |
