From 9bba2e0065c3e656f05ce384ee640f3344135d96 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Wed, 5 Jul 2023 10:56:38 -0700 Subject: [PATCH] Updated Rgb16Color object API (markdown) --- Rgb16Color-object-API.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Rgb16Color-object-API.md b/Rgb16Color-object-API.md index d68b51b..f61535e 100644 --- a/Rgb16Color-object-API.md +++ b/Rgb16Color-object-API.md @@ -132,7 +132,11 @@ This will blend between four colors by the amount defined by 2d weighting values ## Operators ### uint8_t operator[](size_t idx) -The index operator allows accessing the R, G, and B properties using an index. There is only read only versions. +The index operator allows accessing the R, G, and B properties using an index. There are both read only and read write versions. +``` + uint16_t green = color[1]; +``` +You can also use the color index constants. +``` + uint16_t green = color[ColorIndexG]; ``` - uint8_t green = color[1]; -``` \ No newline at end of file