Palettes / Cardboard Paint

Cardboard Paint by Cactus Celery

a calm day to do some painting on cardboard ♡

🦀 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/cardboard-paint
    set_color(Color::from(1), RGB::new(0xd2, 0xb2, 0xa0));
    set_color(Color::from(2), RGB::new(0xb1, 0x89, 0x79));
    set_color(Color::from(3), RGB::new(0x6f, 0x54, 0x4c));
    set_color(Color::from(4), RGB::new(0x3e, 0x2a, 0x2e));
    set_color(Color::from(5), RGB::new(0x8f, 0x36, 0x41));
    set_color(Color::from(6), RGB::new(0xb9, 0x68, 0x4f));
    set_color(Color::from(7), RGB::new(0xd2, 0xa8, 0x65));
    set_color(Color::from(8), RGB::new(0x75, 0xa1, 0x65));
    set_color(Color::from(9), RGB::new(0x45, 0x7c, 0x60));
    set_color(Color::from(10), RGB::new(0x32, 0x55, 0x4f));
    set_color(Color::from(11), RGB::new(0x51, 0x81, 0x83));
    set_color(Color::from(12), RGB::new(0x85, 0xa7, 0xb6));
    set_color(Color::from(13), RGB::new(0x57, 0x57, 0x77));
    set_color(Color::from(14), RGB::new(0x4d, 0x39, 0x56));
    set_color(Color::from(15), RGB::new(0x85, 0x48, 0x65));
    set_color(Color::from(16), RGB::new(0xbe, 0x7a, 0x80));
}

🏃 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/cardboard-paint
    firefly.SetColor(1, firefly.RGB{R: 0xd2, G: 0xb2, B: 0xa0})
    firefly.SetColor(2, firefly.RGB{R: 0xb1, G: 0x89, B: 0x79})
    firefly.SetColor(3, firefly.RGB{R: 0x6f, G: 0x54, B: 0x4c})
    firefly.SetColor(4, firefly.RGB{R: 0x3e, G: 0x2a, B: 0x2e})
    firefly.SetColor(5, firefly.RGB{R: 0x8f, G: 0x36, B: 0x41})
    firefly.SetColor(6, firefly.RGB{R: 0xb9, G: 0x68, B: 0x4f})
    firefly.SetColor(7, firefly.RGB{R: 0xd2, G: 0xa8, B: 0x65})
    firefly.SetColor(8, firefly.RGB{R: 0x75, G: 0xa1, B: 0x65})
    firefly.SetColor(9, firefly.RGB{R: 0x45, G: 0x7c, B: 0x60})
    firefly.SetColor(10, firefly.RGB{R: 0x32, G: 0x55, B: 0x4f})
    firefly.SetColor(11, firefly.RGB{R: 0x51, G: 0x81, B: 0x83})
    firefly.SetColor(12, firefly.RGB{R: 0x85, G: 0xa7, B: 0xb6})
    firefly.SetColor(13, firefly.RGB{R: 0x57, G: 0x57, B: 0x77})
    firefly.SetColor(14, firefly.RGB{R: 0x4d, G: 0x39, B: 0x56})
    firefly.SetColor(15, firefly.RGB{R: 0x85, G: 0x48, B: 0x65})
    firefly.SetColor(16, firefly.RGB{R: 0xbe, G: 0x7a, B: 0x80})
}

⚡️ Zig

const ff = @import("firefly");

pub export fn update() void {
    setColors()
}

fn setColors() void {
    // https://lospec.com/palette-list/cardboard-paint
    ff.setColor(@enumFromInt(1), ff.RGB{.r = 0xd2, .g = 0xb2, .b = 0xa0});
    ff.setColor(@enumFromInt(2), ff.RGB{.r = 0xb1, .g = 0x89, .b = 0x79});
    ff.setColor(@enumFromInt(3), ff.RGB{.r = 0x6f, .g = 0x54, .b = 0x4c});
    ff.setColor(@enumFromInt(4), ff.RGB{.r = 0x3e, .g = 0x2a, .b = 0x2e});
    ff.setColor(@enumFromInt(5), ff.RGB{.r = 0x8f, .g = 0x36, .b = 0x41});
    ff.setColor(@enumFromInt(6), ff.RGB{.r = 0xb9, .g = 0x68, .b = 0x4f});
    ff.setColor(@enumFromInt(7), ff.RGB{.r = 0xd2, .g = 0xa8, .b = 0x65});
    ff.setColor(@enumFromInt(8), ff.RGB{.r = 0x75, .g = 0xa1, .b = 0x65});
    ff.setColor(@enumFromInt(9), ff.RGB{.r = 0x45, .g = 0x7c, .b = 0x60});
    ff.setColor(@enumFromInt(10), ff.RGB{.r = 0x32, .g = 0x55, .b = 0x4f});
    ff.setColor(@enumFromInt(11), ff.RGB{.r = 0x51, .g = 0x81, .b = 0x83});
    ff.setColor(@enumFromInt(12), ff.RGB{.r = 0x85, .g = 0xa7, .b = 0xb6});
    ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x57, .g = 0x57, .b = 0x77});
    ff.setColor(@enumFromInt(14), ff.RGB{.r = 0x4d, .g = 0x39, .b = 0x56});
    ff.setColor(@enumFromInt(15), ff.RGB{.r = 0x85, .g = 0x48, .b = 0x65});
    ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xbe, .g = 0x7a, .b = 0x80});
}

🐀 C

#include "./vendor/firefly/firefly.c"

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/cardboard-paint
    RGB color1 = {0xd2, 0xb2, 0xa0};
    set_color(1, color1);
    RGB color2 = {0xb1, 0x89, 0x79};
    set_color(2, color2);
    RGB color3 = {0x6f, 0x54, 0x4c};
    set_color(3, color3);
    RGB color4 = {0x3e, 0x2a, 0x2e};
    set_color(4, color4);
    RGB color5 = {0x8f, 0x36, 0x41};
    set_color(5, color5);
    RGB color6 = {0xb9, 0x68, 0x4f};
    set_color(6, color6);
    RGB color7 = {0xd2, 0xa8, 0x65};
    set_color(7, color7);
    RGB color8 = {0x75, 0xa1, 0x65};
    set_color(8, color8);
    RGB color9 = {0x45, 0x7c, 0x60};
    set_color(9, color9);
    RGB color10 = {0x32, 0x55, 0x4f};
    set_color(10, color10);
    RGB color11 = {0x51, 0x81, 0x83};
    set_color(11, color11);
    RGB color12 = {0x85, 0xa7, 0xb6};
    set_color(12, color12);
    RGB color13 = {0x57, 0x57, 0x77};
    set_color(13, color13);
    RGB color14 = {0x4d, 0x39, 0x56};
    set_color(14, color14);
    RGB color15 = {0x85, 0x48, 0x65};
    set_color(15, color15);
    RGB color16 = {0xbe, 0x7a, 0x80};
    set_color(16, color16);
}

➕ C++

#include "./vendor/firefly/firefly.c"

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/cardboard-paint
    set_color(1, {0xd2, 0xb2, 0xa0});
    set_color(2, {0xb1, 0x89, 0x79});
    set_color(3, {0x6f, 0x54, 0x4c});
    set_color(4, {0x3e, 0x2a, 0x2e});
    set_color(5, {0x8f, 0x36, 0x41});
    set_color(6, {0xb9, 0x68, 0x4f});
    set_color(7, {0xd2, 0xa8, 0x65});
    set_color(8, {0x75, 0xa1, 0x65});
    set_color(9, {0x45, 0x7c, 0x60});
    set_color(10, {0x32, 0x55, 0x4f});
    set_color(11, {0x51, 0x81, 0x83});
    set_color(12, {0x85, 0xa7, 0xb6});
    set_color(13, {0x57, 0x57, 0x77});
    set_color(14, {0x4d, 0x39, 0x56});
    set_color(15, {0x85, 0x48, 0x65});
    set_color(16, {0xbe, 0x7a, 0x80});
}

🐰 MoonBit

///|
using @firefly {type Color, type RGB}

///|
pub fn boot() -> Unit {
  set_colors()
}

///|
fn set_colors() -> Unit {
  // https://lospec.com/palette-list/cardboard-paint
  @firefly.set_color(Color::from_int(1), RGB::new(0xd2, 0xb2, 0xa0));
  @firefly.set_color(Color::from_int(2), RGB::new(0xb1, 0x89, 0x79));
  @firefly.set_color(Color::from_int(3), RGB::new(0x6f, 0x54, 0x4c));
  @firefly.set_color(Color::from_int(4), RGB::new(0x3e, 0x2a, 0x2e));
  @firefly.set_color(Color::from_int(5), RGB::new(0x8f, 0x36, 0x41));
  @firefly.set_color(Color::from_int(6), RGB::new(0xb9, 0x68, 0x4f));
  @firefly.set_color(Color::from_int(7), RGB::new(0xd2, 0xa8, 0x65));
  @firefly.set_color(Color::from_int(8), RGB::new(0x75, 0xa1, 0x65));
  @firefly.set_color(Color::from_int(9), RGB::new(0x45, 0x7c, 0x60));
  @firefly.set_color(Color::from_int(10), RGB::new(0x32, 0x55, 0x4f));
  @firefly.set_color(Color::from_int(11), RGB::new(0x51, 0x81, 0x83));
  @firefly.set_color(Color::from_int(12), RGB::new(0x85, 0xa7, 0xb6));
  @firefly.set_color(Color::from_int(13), RGB::new(0x57, 0x57, 0x77));
  @firefly.set_color(Color::from_int(14), RGB::new(0x4d, 0x39, 0x56));
  @firefly.set_color(Color::from_int(15), RGB::new(0x85, 0x48, 0x65));
  @firefly.set_color(Color::from_int(16), RGB::new(0xbe, 0x7a, 0x80));
}

🌙 Lua

function boot()
  set_colors()
end

function set_colors()
  -- https://lospec.com/palette-list/cardboard-paint
  firefly.set_color(1, {r=0xd2, g=0xb2, b=0xa0});
  firefly.set_color(2, {r=0xb1, g=0x89, b=0x79});
  firefly.set_color(3, {r=0x6f, g=0x54, b=0x4c});
  firefly.set_color(4, {r=0x3e, g=0x2a, b=0x2e});
  firefly.set_color(5, {r=0x8f, g=0x36, b=0x41});
  firefly.set_color(6, {r=0xb9, g=0x68, b=0x4f});
  firefly.set_color(7, {r=0xd2, g=0xa8, b=0x65});
  firefly.set_color(8, {r=0x75, g=0xa1, b=0x65});
  firefly.set_color(9, {r=0x45, g=0x7c, b=0x60});
  firefly.set_color(10, {r=0x32, g=0x55, b=0x4f});
  firefly.set_color(11, {r=0x51, g=0x81, b=0x83});
  firefly.set_color(12, {r=0x85, g=0xa7, b=0xb6});
  firefly.set_color(13, {r=0x57, g=0x57, b=0x77});
  firefly.set_color(14, {r=0x4d, g=0x39, b=0x56});
  firefly.set_color(15, {r=0x85, g=0x48, b=0x65});
  firefly.set_color(16, {r=0xbe, g=0x7a, b=0x80});
end