Minimalist art? Starter? Small-pixel challenger?
These 16 colors can help you!
(EDIT: Important, don't confuse the name with "16 bit")
🦀 Rust
#![no_std]
#![no_main]
use firefly_rust::*;
#[unsafe(no_mangle)]
extern "C" fn boot() {
set_colors();
}
fn set_colors() {
// https://lospec.com/palette-list/16-bital
set_color(Color::from(1), RGB::new(0x21, 0x2b, 0x5e));
set_color(Color::from(2), RGB::new(0x63, 0x6f, 0xb2));
set_color(Color::from(3), RGB::new(0xad, 0xc4, 0xff));
set_color(Color::from(4), RGB::new(0xff, 0xff, 0xff));
set_color(Color::from(5), RGB::new(0xff, 0xcc, 0xd7));
set_color(Color::from(6), RGB::new(0xff, 0x7f, 0xbd));
set_color(Color::from(7), RGB::new(0x87, 0x24, 0x50));
set_color(Color::from(8), RGB::new(0xe5, 0x2d, 0x40));
set_color(Color::from(9), RGB::new(0xef, 0x60, 0x4a));
set_color(Color::from(10), RGB::new(0xff, 0xd8, 0x77));
set_color(Color::from(11), RGB::new(0x00, 0xcc, 0x8b));
set_color(Color::from(12), RGB::new(0x00, 0x5a, 0x75));
set_color(Color::from(13), RGB::new(0x51, 0x3a, 0xe8));
set_color(Color::from(14), RGB::new(0x19, 0xba, 0xff));
set_color(Color::from(15), RGB::new(0x77, 0x31, 0xa5));
set_color(Color::from(16), RGB::new(0xb9, 0x7c, 0xff));
}
🏃 Go
package main
import "github.com/firefly-zero/firefly-go/firefly"
func init() {
firefly.Boot = boot
}
func boot() {
setColors()
}
func setColors() {
// https://lospec.com/palette-list/16-bital
firefly.SetColor(1, firefly.RGB{R: 0x21, G: 0x2b, B: 0x5e})
firefly.SetColor(2, firefly.RGB{R: 0x63, G: 0x6f, B: 0xb2})
firefly.SetColor(3, firefly.RGB{R: 0xad, G: 0xc4, B: 0xff})
firefly.SetColor(4, firefly.RGB{R: 0xff, G: 0xff, B: 0xff})
firefly.SetColor(5, firefly.RGB{R: 0xff, G: 0xcc, B: 0xd7})
firefly.SetColor(6, firefly.RGB{R: 0xff, G: 0x7f, B: 0xbd})
firefly.SetColor(7, firefly.RGB{R: 0x87, G: 0x24, B: 0x50})
firefly.SetColor(8, firefly.RGB{R: 0xe5, G: 0x2d, B: 0x40})
firefly.SetColor(9, firefly.RGB{R: 0xef, G: 0x60, B: 0x4a})
firefly.SetColor(10, firefly.RGB{R: 0xff, G: 0xd8, B: 0x77})
firefly.SetColor(11, firefly.RGB{R: 0x00, G: 0xcc, B: 0x8b})
firefly.SetColor(12, firefly.RGB{R: 0x00, G: 0x5a, B: 0x75})
firefly.SetColor(13, firefly.RGB{R: 0x51, G: 0x3a, B: 0xe8})
firefly.SetColor(14, firefly.RGB{R: 0x19, G: 0xba, B: 0xff})
firefly.SetColor(15, firefly.RGB{R: 0x77, G: 0x31, B: 0xa5})
firefly.SetColor(16, firefly.RGB{R: 0xb9, G: 0x7c, B: 0xff})
}
⚡️ Zig
const ff = @import("firefly");
pub export fn update() void {
setColors()
}
fn setColors() void {
// https://lospec.com/palette-list/16-bital
ff.setColor(@enumFromInt(1), ff.RGB{.r = 0x21, .g = 0x2b, .b = 0x5e});
ff.setColor(@enumFromInt(2), ff.RGB{.r = 0x63, .g = 0x6f, .b = 0xb2});
ff.setColor(@enumFromInt(3), ff.RGB{.r = 0xad, .g = 0xc4, .b = 0xff});
ff.setColor(@enumFromInt(4), ff.RGB{.r = 0xff, .g = 0xff, .b = 0xff});
ff.setColor(@enumFromInt(5), ff.RGB{.r = 0xff, .g = 0xcc, .b = 0xd7});
ff.setColor(@enumFromInt(6), ff.RGB{.r = 0xff, .g = 0x7f, .b = 0xbd});
ff.setColor(@enumFromInt(7), ff.RGB{.r = 0x87, .g = 0x24, .b = 0x50});
ff.setColor(@enumFromInt(8), ff.RGB{.r = 0xe5, .g = 0x2d, .b = 0x40});
ff.setColor(@enumFromInt(9), ff.RGB{.r = 0xef, .g = 0x60, .b = 0x4a});
ff.setColor(@enumFromInt(10), ff.RGB{.r = 0xff, .g = 0xd8, .b = 0x77});
ff.setColor(@enumFromInt(11), ff.RGB{.r = 0x00, .g = 0xcc, .b = 0x8b});
ff.setColor(@enumFromInt(12), ff.RGB{.r = 0x00, .g = 0x5a, .b = 0x75});
ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x51, .g = 0x3a, .b = 0xe8});
ff.setColor(@enumFromInt(14), ff.RGB{.r = 0x19, .g = 0xba, .b = 0xff});
ff.setColor(@enumFromInt(15), ff.RGB{.r = 0x77, .g = 0x31, .b = 0xa5});
ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xb9, .g = 0x7c, .b = 0xff});
}
🐀 C
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/16-bital
RGB color1 = {0x21, 0x2b, 0x5e};
set_color(1, color1);
RGB color2 = {0x63, 0x6f, 0xb2};
set_color(2, color2);
RGB color3 = {0xad, 0xc4, 0xff};
set_color(3, color3);
RGB color4 = {0xff, 0xff, 0xff};
set_color(4, color4);
RGB color5 = {0xff, 0xcc, 0xd7};
set_color(5, color5);
RGB color6 = {0xff, 0x7f, 0xbd};
set_color(6, color6);
RGB color7 = {0x87, 0x24, 0x50};
set_color(7, color7);
RGB color8 = {0xe5, 0x2d, 0x40};
set_color(8, color8);
RGB color9 = {0xef, 0x60, 0x4a};
set_color(9, color9);
RGB color10 = {0xff, 0xd8, 0x77};
set_color(10, color10);
RGB color11 = {0x00, 0xcc, 0x8b};
set_color(11, color11);
RGB color12 = {0x00, 0x5a, 0x75};
set_color(12, color12);
RGB color13 = {0x51, 0x3a, 0xe8};
set_color(13, color13);
RGB color14 = {0x19, 0xba, 0xff};
set_color(14, color14);
RGB color15 = {0x77, 0x31, 0xa5};
set_color(15, color15);
RGB color16 = {0xb9, 0x7c, 0xff};
set_color(16, color16);
}
➕ C++
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/16-bital
set_color(1, {0x21, 0x2b, 0x5e});
set_color(2, {0x63, 0x6f, 0xb2});
set_color(3, {0xad, 0xc4, 0xff});
set_color(4, {0xff, 0xff, 0xff});
set_color(5, {0xff, 0xcc, 0xd7});
set_color(6, {0xff, 0x7f, 0xbd});
set_color(7, {0x87, 0x24, 0x50});
set_color(8, {0xe5, 0x2d, 0x40});
set_color(9, {0xef, 0x60, 0x4a});
set_color(10, {0xff, 0xd8, 0x77});
set_color(11, {0x00, 0xcc, 0x8b});
set_color(12, {0x00, 0x5a, 0x75});
set_color(13, {0x51, 0x3a, 0xe8});
set_color(14, {0x19, 0xba, 0xff});
set_color(15, {0x77, 0x31, 0xa5});
set_color(16, {0xb9, 0x7c, 0xff});
}
🐰 MoonBit
///|
using @firefly {type Color, type RGB}
///|
pub fn boot() -> Unit {
set_colors()
}
///|
fn set_colors() -> Unit {
// https://lospec.com/palette-list/16-bital
@firefly.set_color(Color::from_int(1), RGB::new(0x21, 0x2b, 0x5e));
@firefly.set_color(Color::from_int(2), RGB::new(0x63, 0x6f, 0xb2));
@firefly.set_color(Color::from_int(3), RGB::new(0xad, 0xc4, 0xff));
@firefly.set_color(Color::from_int(4), RGB::new(0xff, 0xff, 0xff));
@firefly.set_color(Color::from_int(5), RGB::new(0xff, 0xcc, 0xd7));
@firefly.set_color(Color::from_int(6), RGB::new(0xff, 0x7f, 0xbd));
@firefly.set_color(Color::from_int(7), RGB::new(0x87, 0x24, 0x50));
@firefly.set_color(Color::from_int(8), RGB::new(0xe5, 0x2d, 0x40));
@firefly.set_color(Color::from_int(9), RGB::new(0xef, 0x60, 0x4a));
@firefly.set_color(Color::from_int(10), RGB::new(0xff, 0xd8, 0x77));
@firefly.set_color(Color::from_int(11), RGB::new(0x00, 0xcc, 0x8b));
@firefly.set_color(Color::from_int(12), RGB::new(0x00, 0x5a, 0x75));
@firefly.set_color(Color::from_int(13), RGB::new(0x51, 0x3a, 0xe8));
@firefly.set_color(Color::from_int(14), RGB::new(0x19, 0xba, 0xff));
@firefly.set_color(Color::from_int(15), RGB::new(0x77, 0x31, 0xa5));
@firefly.set_color(Color::from_int(16), RGB::new(0xb9, 0x7c, 0xff));
}
🌙 Lua
function boot()
set_colors()
end
function set_colors()
-- https://lospec.com/palette-list/16-bital
firefly.set_color(1, {r=0x21, g=0x2b, b=0x5e});
firefly.set_color(2, {r=0x63, g=0x6f, b=0xb2});
firefly.set_color(3, {r=0xad, g=0xc4, b=0xff});
firefly.set_color(4, {r=0xff, g=0xff, b=0xff});
firefly.set_color(5, {r=0xff, g=0xcc, b=0xd7});
firefly.set_color(6, {r=0xff, g=0x7f, b=0xbd});
firefly.set_color(7, {r=0x87, g=0x24, b=0x50});
firefly.set_color(8, {r=0xe5, g=0x2d, b=0x40});
firefly.set_color(9, {r=0xef, g=0x60, b=0x4a});
firefly.set_color(10, {r=0xff, g=0xd8, b=0x77});
firefly.set_color(11, {r=0x00, g=0xcc, b=0x8b});
firefly.set_color(12, {r=0x00, g=0x5a, b=0x75});
firefly.set_color(13, {r=0x51, g=0x3a, b=0xe8});
firefly.set_color(14, {r=0x19, g=0xba, b=0xff});
firefly.set_color(15, {r=0x77, g=0x31, b=0xa5});
firefly.set_color(16, {r=0xb9, g=0x7c, b=0xff});
end