diff options
| author | Limor "Ladyada" Fried <limor@ladyada.net> | 2020-11-14 11:47:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-14 11:47:45 -0500 |
| commit | f2e911ad91db7c04673e76c884abbc19494a4e7f (patch) | |
| tree | 47f6a854677781382d715791e7d7534d71887f7a /shared-module/displayio/ColorConverter.c | |
| parent | 9169878ebbeab3fc62785b9bf753499ad9033321 (diff) | |
| parent | bda3267432aee57e704a20308b724369cceeb6ca (diff) | |
Merge pull request #3680 from tannewt/magtag_builtin_display
Add board.DISPLAY to MagTag. Fix luma computation
Diffstat (limited to 'shared-module/displayio/ColorConverter.c')
| -rw-r--r-- | shared-module/displayio/ColorConverter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index 03ec99ceb..80558d037 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -55,7 +55,7 @@ uint8_t displayio_colorconverter_compute_luma(uint32_t color_rgb888) { uint32_t r8 = (color_rgb888 >> 16); uint32_t g8 = (color_rgb888 >> 8) & 0xff; uint32_t b8 = color_rgb888 & 0xff; - return (r8 * 19) / 255 + (g8 * 182) / 255 + (b8 + 54) / 255; + return (r8 * 19 + g8 * 182 + b8 * 54) / 255; } uint8_t displayio_colorconverter_compute_chroma(uint32_t color_rgb888) { |
