aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-01-04 08:11:34 -0700
committerTom Rini <trini@konsulko.com>2024-04-11 08:32:04 -0600
commit499fd4613ce4de73533f3719d749c9fea99a6eb7 (patch)
tree19b60f076e79dd344e728f519aeb721bb0b01c7c
parenta6915942419413153d09fbba28547318f1d77c55 (diff)
downloadu-boot-499fd4613ce4de73533f3719d749c9fea99a6eb7.zip
u-boot-499fd4613ce4de73533f3719d749c9fea99a6eb7.tar.gz
u-boot-499fd4613ce4de73533f3719d749c9fea99a6eb7.tar.bz2
video: Add a dark-grey console colour
This is useful for highlighting something with a black background, as is needed with cedit when using a white-on-black console. Add this as a new colour. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--boot/scene.c2
-rw-r--r--drivers/video/video-uclass.c3
-rw-r--r--include/video.h1
3 files changed, 5 insertions, 1 deletions
diff --git a/boot/scene.c b/boot/scene.c
index d4dfb49..0b37971 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -346,7 +346,7 @@ static void scene_render_background(struct scene_obj *obj, bool box_only)
/* draw a background for the object */
if (CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK)) {
- fore = VID_BLACK;
+ fore = VID_DARK_GREY;
back = VID_WHITE;
} else {
fore = VID_LIGHT_GRAY;
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 3571e62..b82ca1d 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -277,6 +277,9 @@ static const struct vid_rgb colours[VID_COLOUR_COUNT] = {
{ 0xff, 0x00, 0xff }, /* bright magenta */
{ 0x00, 0xff, 0xff }, /* bright cyan */
{ 0xff, 0xff, 0xff }, /* white */
+
+ /* an extra one for menus */
+ { 0x40, 0x40, 0x40 }, /* dark gray */
};
u32 video_index_to_colour(struct video_priv *priv, enum colour_idx idx)
diff --git a/include/video.h b/include/video.h
index 4d8df9b..ae9ce03 100644
--- a/include/video.h
+++ b/include/video.h
@@ -179,6 +179,7 @@ enum colour_idx {
VID_LIGHT_MAGENTA,
VID_LIGHT_CYAN,
VID_WHITE,
+ VID_DARK_GREY,
VID_COLOUR_COUNT
};