color cleanup and brightness

This commit is contained in:
2024-05-19 21:42:39 +02:00
parent 7894359f30
commit d9fd18d799
8 changed files with 126 additions and 97 deletions

View File

@ -1,7 +1,5 @@
#include "colors.h"
#define DF 5
#define DF_M 3
.section ".rodata","a"
;; color definitions according to
;; https://learn.sparkfun.com/tutorials/lilypad-protosnap-plus-activity-guide/3-custom-color-mixing
@ -9,43 +7,49 @@ colors:
.global colors
;; red, green, blue, padding
.byte 0x00, 0x00, 0x00, 0 ;; off
.byte 0x00>>DF, 0x00>>DF, 0xff>>DF, 0 ;; blue
.byte 0x00>>DF, 0xff>>DF, 0x00>>DF, 0 ;; green
.byte 0xff>>DF, 0x80>>DF, 0x00>>DF, 0 ;; orange
.byte 0xff>>DF, 0x00>>DF, 0x80>>DF, 0 ;; rose
.byte 0xff>>DF, 0x00>>DF, 0xff>>DF, 0 ;; magenta
.byte 0x80>>DF, 0x00>>DF, 0xff>>DF, 0 ;; violet
.byte 0x00>>DF, 0x80>>DF, 0xff>>DF, 0 ;; azure
.byte 0x00>>DF, 0xff>>DF, 0xff>>DF, 0 ;; cyan
.byte 0x00>>DF, 0xff>>DF, 0x80>>DF, 0 ;; springgreen
.byte 0x80>>DF, 0xff>>DF, 0x00>>DF, 0 ;; chartreuse
.byte 0xff>>DF, 0xff>>DF, 0x00>>DF, 0 ;; yellow
.byte 0xff>>DF, 0xff>>DF, 0xff>>DF, 0 ;; white
.byte 0xff>>DF, 0x00>>DF, 0x00>>DF, 0 ;; red
.byte 0x00>>DF_M, 0x00>>DF_M, 0xff>>DF_M, 0 ;; blue
.byte 0x00>>DF_M, 0xff>>DF_M, 0x00>>DF_M, 0 ;; green
.byte 0xff>>DF_M, 0x80>>DF_M, 0x00>>DF_M, 0 ;; orange
.byte 0xff>>DF_M, 0x00>>DF_M, 0x80>>DF_M, 0 ;; rose
.byte 0xff>>DF_M, 0x00>>DF_M, 0xff>>DF_M, 0 ;; magenta
.byte 0x80>>DF_M, 0x00>>DF_M, 0xff>>DF_M, 0 ;; violet
.byte 0x00>>DF_M, 0x80>>DF_M, 0xff>>DF_M, 0 ;; azure
.byte 0x00>>DF_M, 0xff>>DF_M, 0xff>>DF_M, 0 ;; cyan
.byte 0x00>>DF_M, 0xff>>DF_M, 0x80>>DF_M, 0 ;; springgreen
.byte 0x80>>DF_M, 0xff>>DF_M, 0x00>>DF_M, 0 ;; chartreuse
.byte 0xff>>DF_M, 0xff>>DF_M, 0x00>>DF_M, 0 ;; yellow
.byte 0xff>>DF_M, 0xff>>DF_M, 0xff>>DF_M, 0 ;; white
.byte 0xff>>DF_M, 0x00>>DF_M, 0x00>>DF_M, 0 ;; red
.byte 0x00, 0x00, 0xff, 0 ;; blue
.byte 0x00, 0xff, 0x00, 0 ;; green
.byte 0xff, 0x80, 0x00, 0 ;; orange
.byte 0xff, 0x00, 0x80, 0 ;; rose
.byte 0xff, 0x00, 0xff, 0 ;; magenta
.byte 0x80, 0x00, 0xff, 0 ;; violet
.byte 0x00, 0x80, 0xff, 0 ;; azure
.byte 0x00, 0xff, 0xff, 0 ;; cyan
.byte 0x00, 0xff, 0x80, 0 ;; springgreen
.byte 0x80, 0xff, 0x00, 0 ;; chartreuse
.byte 0xff, 0xff, 0x00, 0 ;; yellow
.byte 0xff, 0xff, 0xff, 0 ;; white
.byte 0xff, 0x00, 0x00, 0 ;; red
.byte 0x00>>5, 0x00>>5, 0xff>>5, 0 ;; blue
.byte 0x00>>5, 0xff>>5, 0x00>>5, 0 ;; green
.byte 0xff>>5, 0x80>>5, 0x00>>5, 0 ;; orange
.byte 0x80>>5, 0x00>>5, 0xff>>5, 0 ;; violet
.byte 0x00>>5, 0xff>>5, 0xff>>5, 0 ;; cyan
.byte 0xff>>5, 0xff>>5, 0x00>>5, 0 ;; yellow
.byte 0xff>>5, 0x00>>5, 0x00>>5, 0 ;; red
.byte 0xff>>5, 0xff>>5, 0xff>>5, 0 ;; white
.byte 0x00>>4, 0x00>>4, 0xff>>4, 0 ;; blue
.byte 0x00>>4, 0xff>>4, 0x00>>4, 0 ;; green
.byte 0xff>>4, 0x80>>4, 0x00>>4, 0 ;; orange
.byte 0x80>>4, 0x00>>4, 0xff>>4, 0 ;; violet
.byte 0x00>>4, 0xff>>4, 0xff>>4, 0 ;; cyan
.byte 0xff>>4, 0xff>>4, 0x00>>4, 0 ;; yellow
.byte 0xff>>4, 0x00>>4, 0x00>>4, 0 ;; red
.byte 0xff>>4, 0xff>>4, 0xff>>4, 0 ;; white
.byte 0x00>>3, 0x00>>3, 0xff>>3, 0 ;; blue
.byte 0x00>>3, 0xff>>3, 0x00>>3, 0 ;; green
.byte 0xff>>3, 0x80>>3, 0x00>>3, 0 ;; orange
.byte 0x80>>3, 0x00>>3, 0xff>>3, 0 ;; violet
.byte 0x00>>3, 0xff>>3, 0xff>>3, 0 ;; cyan
.byte 0xff>>3, 0xff>>3, 0x00>>3, 0 ;; yellow
.byte 0xff>>3, 0x00>>3, 0x00>>3, 0 ;; red
.byte 0xff>>3, 0xff>>3, 0xff>>3, 0 ;; white
.byte 0x00>>2, 0x00>>2, 0xff>>2, 0 ;; blue
.byte 0x00>>2, 0xff>>2, 0x00>>2, 0 ;; green
.byte 0xff>>2, 0x80>>2, 0x00>>2, 0 ;; orange
.byte 0x80>>2, 0x00>>2, 0xff>>2, 0 ;; violet
.byte 0x00>>2, 0xff>>2, 0xff>>2, 0 ;; cyan
.byte 0xff>>2, 0xff>>2, 0x00>>2, 0 ;; yellow
.byte 0xff>>2, 0x00>>2, 0x00>>2, 0 ;; red
.byte 0xff>>2, 0xff>>2, 0xff>>2, 0 ;; white
.byte 0x00>>1, 0x00>>1, 0xff>>1, 0 ;; blue
.byte 0x00>>1, 0xff>>1, 0x00>>1, 0 ;; green
.byte 0xff>>1, 0x80>>1, 0x00>>1, 0 ;; orange
.byte 0x80>>1, 0x00>>1, 0xff>>1, 0 ;; violet
.byte 0x00>>1, 0xff>>1, 0xff>>1, 0 ;; cyan
.byte 0xff>>1, 0xff>>1, 0x00>>1, 0 ;; yellow
.byte 0xff>>1, 0x00>>1, 0x00>>1, 0 ;; red
.byte 0xff>>1, 0xff>>1, 0xff>>1, 0 ;; white