A palette inspired by the Bestiarium of Aloys ZΓΆtl (1835)
π¦ 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/lost-century
set_color(Color::from(1), RGB::new(0xd1, 0xb1, 0x87));
set_color(Color::from(2), RGB::new(0xc7, 0x7b, 0x58));
set_color(Color::from(3), RGB::new(0xae, 0x5d, 0x40));
set_color(Color::from(4), RGB::new(0x79, 0x44, 0x4a));
set_color(Color::from(5), RGB::new(0x4b, 0x3d, 0x44));
set_color(Color::from(6), RGB::new(0xba, 0x91, 0x58));
set_color(Color::from(7), RGB::new(0x92, 0x74, 0x41));
set_color(Color::from(8), RGB::new(0x4d, 0x45, 0x39));
set_color(Color::from(9), RGB::new(0x77, 0x74, 0x3b));
set_color(Color::from(10), RGB::new(0xb3, 0xa5, 0x55));
set_color(Color::from(11), RGB::new(0xd2, 0xc9, 0xa5));
set_color(Color::from(12), RGB::new(0x8c, 0xab, 0xa1));
set_color(Color::from(13), RGB::new(0x4b, 0x72, 0x6e));
set_color(Color::from(14), RGB::new(0x57, 0x48, 0x52));
set_color(Color::from(15), RGB::new(0x84, 0x78, 0x75));
set_color(Color::from(16), RGB::new(0xab, 0x9b, 0x8e));
}
π 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/lost-century
firefly.SetColor(1, firefly.RGB{R: 0xd1, G: 0xb1, B: 0x87})
firefly.SetColor(2, firefly.RGB{R: 0xc7, G: 0x7b, B: 0x58})
firefly.SetColor(3, firefly.RGB{R: 0xae, G: 0x5d, B: 0x40})
firefly.SetColor(4, firefly.RGB{R: 0x79, G: 0x44, B: 0x4a})
firefly.SetColor(5, firefly.RGB{R: 0x4b, G: 0x3d, B: 0x44})
firefly.SetColor(6, firefly.RGB{R: 0xba, G: 0x91, B: 0x58})
firefly.SetColor(7, firefly.RGB{R: 0x92, G: 0x74, B: 0x41})
firefly.SetColor(8, firefly.RGB{R: 0x4d, G: 0x45, B: 0x39})
firefly.SetColor(9, firefly.RGB{R: 0x77, G: 0x74, B: 0x3b})
firefly.SetColor(10, firefly.RGB{R: 0xb3, G: 0xa5, B: 0x55})
firefly.SetColor(11, firefly.RGB{R: 0xd2, G: 0xc9, B: 0xa5})
firefly.SetColor(12, firefly.RGB{R: 0x8c, G: 0xab, B: 0xa1})
firefly.SetColor(13, firefly.RGB{R: 0x4b, G: 0x72, B: 0x6e})
firefly.SetColor(14, firefly.RGB{R: 0x57, G: 0x48, B: 0x52})
firefly.SetColor(15, firefly.RGB{R: 0x84, G: 0x78, B: 0x75})
firefly.SetColor(16, firefly.RGB{R: 0xab, G: 0x9b, B: 0x8e})
}
β‘οΈ Zig
const ff = @import("firefly");
pub export fn update() void {
setColors()
}
fn setColors() void {
// https://lospec.com/palette-list/lost-century
ff.setColor(@enumFromInt(1), ff.RGB{.r = 0xd1, .g = 0xb1, .b = 0x87});
ff.setColor(@enumFromInt(2), ff.RGB{.r = 0xc7, .g = 0x7b, .b = 0x58});
ff.setColor(@enumFromInt(3), ff.RGB{.r = 0xae, .g = 0x5d, .b = 0x40});
ff.setColor(@enumFromInt(4), ff.RGB{.r = 0x79, .g = 0x44, .b = 0x4a});
ff.setColor(@enumFromInt(5), ff.RGB{.r = 0x4b, .g = 0x3d, .b = 0x44});
ff.setColor(@enumFromInt(6), ff.RGB{.r = 0xba, .g = 0x91, .b = 0x58});
ff.setColor(@enumFromInt(7), ff.RGB{.r = 0x92, .g = 0x74, .b = 0x41});
ff.setColor(@enumFromInt(8), ff.RGB{.r = 0x4d, .g = 0x45, .b = 0x39});
ff.setColor(@enumFromInt(9), ff.RGB{.r = 0x77, .g = 0x74, .b = 0x3b});
ff.setColor(@enumFromInt(10), ff.RGB{.r = 0xb3, .g = 0xa5, .b = 0x55});
ff.setColor(@enumFromInt(11), ff.RGB{.r = 0xd2, .g = 0xc9, .b = 0xa5});
ff.setColor(@enumFromInt(12), ff.RGB{.r = 0x8c, .g = 0xab, .b = 0xa1});
ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x4b, .g = 0x72, .b = 0x6e});
ff.setColor(@enumFromInt(14), ff.RGB{.r = 0x57, .g = 0x48, .b = 0x52});
ff.setColor(@enumFromInt(15), ff.RGB{.r = 0x84, .g = 0x78, .b = 0x75});
ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xab, .g = 0x9b, .b = 0x8e});
}
π C
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/lost-century
RGB color1 = {0xd1, 0xb1, 0x87};
set_color(1, color1);
RGB color2 = {0xc7, 0x7b, 0x58};
set_color(2, color2);
RGB color3 = {0xae, 0x5d, 0x40};
set_color(3, color3);
RGB color4 = {0x79, 0x44, 0x4a};
set_color(4, color4);
RGB color5 = {0x4b, 0x3d, 0x44};
set_color(5, color5);
RGB color6 = {0xba, 0x91, 0x58};
set_color(6, color6);
RGB color7 = {0x92, 0x74, 0x41};
set_color(7, color7);
RGB color8 = {0x4d, 0x45, 0x39};
set_color(8, color8);
RGB color9 = {0x77, 0x74, 0x3b};
set_color(9, color9);
RGB color10 = {0xb3, 0xa5, 0x55};
set_color(10, color10);
RGB color11 = {0xd2, 0xc9, 0xa5};
set_color(11, color11);
RGB color12 = {0x8c, 0xab, 0xa1};
set_color(12, color12);
RGB color13 = {0x4b, 0x72, 0x6e};
set_color(13, color13);
RGB color14 = {0x57, 0x48, 0x52};
set_color(14, color14);
RGB color15 = {0x84, 0x78, 0x75};
set_color(15, color15);
RGB color16 = {0xab, 0x9b, 0x8e};
set_color(16, color16);
}
β C++
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/lost-century
set_color(1, {0xd1, 0xb1, 0x87});
set_color(2, {0xc7, 0x7b, 0x58});
set_color(3, {0xae, 0x5d, 0x40});
set_color(4, {0x79, 0x44, 0x4a});
set_color(5, {0x4b, 0x3d, 0x44});
set_color(6, {0xba, 0x91, 0x58});
set_color(7, {0x92, 0x74, 0x41});
set_color(8, {0x4d, 0x45, 0x39});
set_color(9, {0x77, 0x74, 0x3b});
set_color(10, {0xb3, 0xa5, 0x55});
set_color(11, {0xd2, 0xc9, 0xa5});
set_color(12, {0x8c, 0xab, 0xa1});
set_color(13, {0x4b, 0x72, 0x6e});
set_color(14, {0x57, 0x48, 0x52});
set_color(15, {0x84, 0x78, 0x75});
set_color(16, {0xab, 0x9b, 0x8e});
}
π° MoonBit
///|
using @firefly {type Color, type RGB}
///|
pub fn boot() -> Unit {
set_colors()
}
///|
fn set_colors() -> Unit {
// https://lospec.com/palette-list/lost-century
@firefly.set_color(Color::from_int(1), RGB::new(0xd1, 0xb1, 0x87));
@firefly.set_color(Color::from_int(2), RGB::new(0xc7, 0x7b, 0x58));
@firefly.set_color(Color::from_int(3), RGB::new(0xae, 0x5d, 0x40));
@firefly.set_color(Color::from_int(4), RGB::new(0x79, 0x44, 0x4a));
@firefly.set_color(Color::from_int(5), RGB::new(0x4b, 0x3d, 0x44));
@firefly.set_color(Color::from_int(6), RGB::new(0xba, 0x91, 0x58));
@firefly.set_color(Color::from_int(7), RGB::new(0x92, 0x74, 0x41));
@firefly.set_color(Color::from_int(8), RGB::new(0x4d, 0x45, 0x39));
@firefly.set_color(Color::from_int(9), RGB::new(0x77, 0x74, 0x3b));
@firefly.set_color(Color::from_int(10), RGB::new(0xb3, 0xa5, 0x55));
@firefly.set_color(Color::from_int(11), RGB::new(0xd2, 0xc9, 0xa5));
@firefly.set_color(Color::from_int(12), RGB::new(0x8c, 0xab, 0xa1));
@firefly.set_color(Color::from_int(13), RGB::new(0x4b, 0x72, 0x6e));
@firefly.set_color(Color::from_int(14), RGB::new(0x57, 0x48, 0x52));
@firefly.set_color(Color::from_int(15), RGB::new(0x84, 0x78, 0x75));
@firefly.set_color(Color::from_int(16), RGB::new(0xab, 0x9b, 0x8e));
}
π Lua
function boot()
set_colors()
end
function set_colors()
-- https://lospec.com/palette-list/lost-century
firefly.set_color(1, {r=0xd1, g=0xb1, b=0x87});
firefly.set_color(2, {r=0xc7, g=0x7b, b=0x58});
firefly.set_color(3, {r=0xae, g=0x5d, b=0x40});
firefly.set_color(4, {r=0x79, g=0x44, b=0x4a});
firefly.set_color(5, {r=0x4b, g=0x3d, b=0x44});
firefly.set_color(6, {r=0xba, g=0x91, b=0x58});
firefly.set_color(7, {r=0x92, g=0x74, b=0x41});
firefly.set_color(8, {r=0x4d, g=0x45, b=0x39});
firefly.set_color(9, {r=0x77, g=0x74, b=0x3b});
firefly.set_color(10, {r=0xb3, g=0xa5, b=0x55});
firefly.set_color(11, {r=0xd2, g=0xc9, b=0xa5});
firefly.set_color(12, {r=0x8c, g=0xab, b=0xa1});
firefly.set_color(13, {r=0x4b, g=0x72, b=0x6e});
firefly.set_color(14, {r=0x57, g=0x48, b=0x52});
firefly.set_color(15, {r=0x84, g=0x78, b=0x75});
firefly.set_color(16, {r=0xab, g=0x9b, b=0x8e});
end