Palettes / Miyazaki 16

Miyazaki 16 by skeddles

Created for Pixelsnorf in exchange for 128 Pikzels. The specifications was a nonlinear 16-color palette inspired by the art of Hayou Miyazaki, specifically landscapes.

🦀 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/miyazaki-16
    set_color(Color::from(1), RGB::new(0x23, 0x22, 0x28));
    set_color(Color::from(2), RGB::new(0x28, 0x42, 0x61));
    set_color(Color::from(3), RGB::new(0x5f, 0x58, 0x54));
    set_color(Color::from(4), RGB::new(0x87, 0x85, 0x73));
    set_color(Color::from(5), RGB::new(0xb8, 0xb0, 0x95));
    set_color(Color::from(6), RGB::new(0xc3, 0xd5, 0xc7));
    set_color(Color::from(7), RGB::new(0xeb, 0xec, 0xdc));
    set_color(Color::from(8), RGB::new(0x24, 0x85, 0xa6));
    set_color(Color::from(9), RGB::new(0x54, 0xba, 0xd2));
    set_color(Color::from(10), RGB::new(0x75, 0x4d, 0x45));
    set_color(Color::from(11), RGB::new(0xc6, 0x50, 0x46));
    set_color(Color::from(12), RGB::new(0xe6, 0x92, 0x8a));
    set_color(Color::from(13), RGB::new(0x1e, 0x74, 0x53));
    set_color(Color::from(14), RGB::new(0x55, 0xa0, 0x58));
    set_color(Color::from(15), RGB::new(0xa1, 0xbf, 0x41));
    set_color(Color::from(16), RGB::new(0xe3, 0xc0, 0x54));
}

🏃 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/miyazaki-16
    firefly.SetColor(1, firefly.RGB{R: 0x23, G: 0x22, B: 0x28})
    firefly.SetColor(2, firefly.RGB{R: 0x28, G: 0x42, B: 0x61})
    firefly.SetColor(3, firefly.RGB{R: 0x5f, G: 0x58, B: 0x54})
    firefly.SetColor(4, firefly.RGB{R: 0x87, G: 0x85, B: 0x73})
    firefly.SetColor(5, firefly.RGB{R: 0xb8, G: 0xb0, B: 0x95})
    firefly.SetColor(6, firefly.RGB{R: 0xc3, G: 0xd5, B: 0xc7})
    firefly.SetColor(7, firefly.RGB{R: 0xeb, G: 0xec, B: 0xdc})
    firefly.SetColor(8, firefly.RGB{R: 0x24, G: 0x85, B: 0xa6})
    firefly.SetColor(9, firefly.RGB{R: 0x54, G: 0xba, B: 0xd2})
    firefly.SetColor(10, firefly.RGB{R: 0x75, G: 0x4d, B: 0x45})
    firefly.SetColor(11, firefly.RGB{R: 0xc6, G: 0x50, B: 0x46})
    firefly.SetColor(12, firefly.RGB{R: 0xe6, G: 0x92, B: 0x8a})
    firefly.SetColor(13, firefly.RGB{R: 0x1e, G: 0x74, B: 0x53})
    firefly.SetColor(14, firefly.RGB{R: 0x55, G: 0xa0, B: 0x58})
    firefly.SetColor(15, firefly.RGB{R: 0xa1, G: 0xbf, B: 0x41})
    firefly.SetColor(16, firefly.RGB{R: 0xe3, G: 0xc0, B: 0x54})
}

⚡️ Zig

const ff = @import("firefly");

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

fn setColors() void {
    // https://lospec.com/palette-list/miyazaki-16
    ff.setColor(@enumFromInt(1), ff.RGB{.r = 0x23, .g = 0x22, .b = 0x28});
    ff.setColor(@enumFromInt(2), ff.RGB{.r = 0x28, .g = 0x42, .b = 0x61});
    ff.setColor(@enumFromInt(3), ff.RGB{.r = 0x5f, .g = 0x58, .b = 0x54});
    ff.setColor(@enumFromInt(4), ff.RGB{.r = 0x87, .g = 0x85, .b = 0x73});
    ff.setColor(@enumFromInt(5), ff.RGB{.r = 0xb8, .g = 0xb0, .b = 0x95});
    ff.setColor(@enumFromInt(6), ff.RGB{.r = 0xc3, .g = 0xd5, .b = 0xc7});
    ff.setColor(@enumFromInt(7), ff.RGB{.r = 0xeb, .g = 0xec, .b = 0xdc});
    ff.setColor(@enumFromInt(8), ff.RGB{.r = 0x24, .g = 0x85, .b = 0xa6});
    ff.setColor(@enumFromInt(9), ff.RGB{.r = 0x54, .g = 0xba, .b = 0xd2});
    ff.setColor(@enumFromInt(10), ff.RGB{.r = 0x75, .g = 0x4d, .b = 0x45});
    ff.setColor(@enumFromInt(11), ff.RGB{.r = 0xc6, .g = 0x50, .b = 0x46});
    ff.setColor(@enumFromInt(12), ff.RGB{.r = 0xe6, .g = 0x92, .b = 0x8a});
    ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x1e, .g = 0x74, .b = 0x53});
    ff.setColor(@enumFromInt(14), ff.RGB{.r = 0x55, .g = 0xa0, .b = 0x58});
    ff.setColor(@enumFromInt(15), ff.RGB{.r = 0xa1, .g = 0xbf, .b = 0x41});
    ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xe3, .g = 0xc0, .b = 0x54});
}

🐀 C

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

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/miyazaki-16
    RGB color1 = {0x23, 0x22, 0x28};
    set_color(1, color1);
    RGB color2 = {0x28, 0x42, 0x61};
    set_color(2, color2);
    RGB color3 = {0x5f, 0x58, 0x54};
    set_color(3, color3);
    RGB color4 = {0x87, 0x85, 0x73};
    set_color(4, color4);
    RGB color5 = {0xb8, 0xb0, 0x95};
    set_color(5, color5);
    RGB color6 = {0xc3, 0xd5, 0xc7};
    set_color(6, color6);
    RGB color7 = {0xeb, 0xec, 0xdc};
    set_color(7, color7);
    RGB color8 = {0x24, 0x85, 0xa6};
    set_color(8, color8);
    RGB color9 = {0x54, 0xba, 0xd2};
    set_color(9, color9);
    RGB color10 = {0x75, 0x4d, 0x45};
    set_color(10, color10);
    RGB color11 = {0xc6, 0x50, 0x46};
    set_color(11, color11);
    RGB color12 = {0xe6, 0x92, 0x8a};
    set_color(12, color12);
    RGB color13 = {0x1e, 0x74, 0x53};
    set_color(13, color13);
    RGB color14 = {0x55, 0xa0, 0x58};
    set_color(14, color14);
    RGB color15 = {0xa1, 0xbf, 0x41};
    set_color(15, color15);
    RGB color16 = {0xe3, 0xc0, 0x54};
    set_color(16, color16);
}

➕ C++

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

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/miyazaki-16
    set_color(1, {0x23, 0x22, 0x28});
    set_color(2, {0x28, 0x42, 0x61});
    set_color(3, {0x5f, 0x58, 0x54});
    set_color(4, {0x87, 0x85, 0x73});
    set_color(5, {0xb8, 0xb0, 0x95});
    set_color(6, {0xc3, 0xd5, 0xc7});
    set_color(7, {0xeb, 0xec, 0xdc});
    set_color(8, {0x24, 0x85, 0xa6});
    set_color(9, {0x54, 0xba, 0xd2});
    set_color(10, {0x75, 0x4d, 0x45});
    set_color(11, {0xc6, 0x50, 0x46});
    set_color(12, {0xe6, 0x92, 0x8a});
    set_color(13, {0x1e, 0x74, 0x53});
    set_color(14, {0x55, 0xa0, 0x58});
    set_color(15, {0xa1, 0xbf, 0x41});
    set_color(16, {0xe3, 0xc0, 0x54});
}

🐰 MoonBit

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

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

///|
fn set_colors() -> Unit {
  // https://lospec.com/palette-list/miyazaki-16
  @firefly.set_color(Color::from_int(1), RGB::new(0x23, 0x22, 0x28));
  @firefly.set_color(Color::from_int(2), RGB::new(0x28, 0x42, 0x61));
  @firefly.set_color(Color::from_int(3), RGB::new(0x5f, 0x58, 0x54));
  @firefly.set_color(Color::from_int(4), RGB::new(0x87, 0x85, 0x73));
  @firefly.set_color(Color::from_int(5), RGB::new(0xb8, 0xb0, 0x95));
  @firefly.set_color(Color::from_int(6), RGB::new(0xc3, 0xd5, 0xc7));
  @firefly.set_color(Color::from_int(7), RGB::new(0xeb, 0xec, 0xdc));
  @firefly.set_color(Color::from_int(8), RGB::new(0x24, 0x85, 0xa6));
  @firefly.set_color(Color::from_int(9), RGB::new(0x54, 0xba, 0xd2));
  @firefly.set_color(Color::from_int(10), RGB::new(0x75, 0x4d, 0x45));
  @firefly.set_color(Color::from_int(11), RGB::new(0xc6, 0x50, 0x46));
  @firefly.set_color(Color::from_int(12), RGB::new(0xe6, 0x92, 0x8a));
  @firefly.set_color(Color::from_int(13), RGB::new(0x1e, 0x74, 0x53));
  @firefly.set_color(Color::from_int(14), RGB::new(0x55, 0xa0, 0x58));
  @firefly.set_color(Color::from_int(15), RGB::new(0xa1, 0xbf, 0x41));
  @firefly.set_color(Color::from_int(16), RGB::new(0xe3, 0xc0, 0x54));
}

🌙 Lua

function boot()
  set_colors()
end

function set_colors()
  -- https://lospec.com/palette-list/miyazaki-16
  firefly.set_color(1, {r=0x23, g=0x22, b=0x28});
  firefly.set_color(2, {r=0x28, g=0x42, b=0x61});
  firefly.set_color(3, {r=0x5f, g=0x58, b=0x54});
  firefly.set_color(4, {r=0x87, g=0x85, b=0x73});
  firefly.set_color(5, {r=0xb8, g=0xb0, b=0x95});
  firefly.set_color(6, {r=0xc3, g=0xd5, b=0xc7});
  firefly.set_color(7, {r=0xeb, g=0xec, b=0xdc});
  firefly.set_color(8, {r=0x24, g=0x85, b=0xa6});
  firefly.set_color(9, {r=0x54, g=0xba, b=0xd2});
  firefly.set_color(10, {r=0x75, g=0x4d, b=0x45});
  firefly.set_color(11, {r=0xc6, g=0x50, b=0x46});
  firefly.set_color(12, {r=0xe6, g=0x92, b=0x8a});
  firefly.set_color(13, {r=0x1e, g=0x74, b=0x53});
  firefly.set_color(14, {r=0x55, g=0xa0, b=0x58});
  firefly.set_color(15, {r=0xa1, g=0xbf, b=0x41});
  firefly.set_color(16, {r=0xe3, g=0xc0, b=0x54});
end