blob: 3a4f5f9433e116db1e38138f43e628c5a40966c7 [file] [log] [blame]
// Copyright 2024 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
#pragma once
#include <cinttypes>
#include "pw_color/color.h"
namespace pw::color {
/// @ingroup pw_color
///
/// RGB565 values for the Pico-8 color palette.
constexpr color_rgb565_t kColorsPico8Rgb565[] = {
0x0000, // #000000 0 Black
0x194a, // #1d2b53 1 Dark blue
0x792a, // #7e2553 2 Dark purple
0x042a, // #008751 3 Dark green
0xaa86, // #ab5236 4 Brown
0x5aa9, // #5f574f 5 Dark gray
0xc618, // #c2c3c7 6 Light gray
0xff9d, // #fff1e8 7 White
0xf809, // #ff004d 8 Red
0xfd00, // #ffa300 9 Orange
0xff64, // #ffec27 10 Yellow
0x0726, // #00e436 11 Green
0x2d7f, // #29adff 12 Blue
0x83b3, // #83769c 13 Indigo
0xfbb5, // #ff77a8 14 Pink
0xfe75, // #ffccaa 15 Peach
};
/// @ingroup pw_color
///
/// RGB8888 values for the Pico-8 color palette.
constexpr color_rgba8888_t kColorsPico8Rgba8888[] = {
0xff000000, // #000000 0 Black
0xff532b1d, // #1d2b53 1 Dark blue
0xff53257e, // #7e2553 2 Dark purple
0xff518700, // #008751 3 Dark green
0xff3652ab, // #ab5236 4 Brown
0xff4f575f, // #5f574f 5 Dark gray
0xffc7c3c2, // #c2c3c7 6 Light gray
0xffe8f1ff, // #fff1e8 7 White
0xff4d00ff, // #ff004d 8 Red
0xff00a3ff, // #ffa300 9 Orange
0xff27ecff, // #ffec27 10 Yellow
0xff36e400, // #00e436 11 Green
0xffffad29, // #29adff 12 Blue
0xff9c7683, // #83769c 13 Indigo
0xffa877ff, // #ff77a8 14 Pink
0xffaaccff, // #ffccaa 15 Peach
};
/// @ingroup pw_color
///
/// Named color index values.
enum ColorIndex : uint8_t {
// clang-format off
kColorBlack = 0,
kColorDarkBlue = 1,
kColorDarkPurple = 2,
kColorDarkGreen = 3,
kColorBrown = 4,
kColorDarkGray = 5,
kColorLightGray = 6,
kColorWhite = 7,
kColorRed = 8,
kColorOrange = 9,
kColorYellow = 10,
kColorGreen = 11,
kColorBlue = 12,
kColorIndigo = 13,
kColorPink = 14,
kColorPeach = 15,
// clang-format on
};
} // namespace pw::color