"There was some activity over at the pixeljoint forums (I'm not registered though) to do a 16 color palette with character. I took this to mean that the palette should have a heavy focus on some colors, and less on others." -Arne Niklas Jansson
#![no_std]
#![no_main]
use firefly_rust::*;
#[unsafe(no_mangle)]
extern "C" fn boot() {
set_colors();
}
fn set_colors() {
// https://lospec.com/palette-list/eroge-copper
set_color(Color::from(1), RGB::new(0x0d, 0x08, 0x0d));
set_color(Color::from(2), RGB::new(0x4f, 0x2b, 0x24));
set_color(Color::from(3), RGB::new(0x82, 0x5b, 0x31));
set_color(Color::from(4), RGB::new(0xc5, 0x91, 0x54));
set_color(Color::from(5), RGB::new(0xf0, 0xbd, 0x77));
set_color(Color::from(6), RGB::new(0xfb, 0xdf, 0x9b));
set_color(Color::from(7), RGB::new(0xff, 0xf9, 0xe4));
set_color(Color::from(8), RGB::new(0xbe, 0xbb, 0xb2));
set_color(Color::from(9), RGB::new(0x7b, 0xb2, 0x4e));
set_color(Color::from(10), RGB::new(0x74, 0xad, 0xbb));
set_color(Color::from(11), RGB::new(0x41, 0x80, 0xa0));
set_color(Color::from(12), RGB::new(0x32, 0x53, 0x5f));
set_color(Color::from(13), RGB::new(0x2a, 0x23, 0x49));
set_color(Color::from(14), RGB::new(0x7d, 0x38, 0x40));
set_color(Color::from(15), RGB::new(0xc1, 0x6c, 0x5b));
set_color(Color::from(16), RGB::new(0xe8, 0x99, 0x73));
}
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/eroge-copper
firefly.SetColor(1, firefly.RGB{R: 0x0d, G: 0x08, B: 0x0d})
firefly.SetColor(2, firefly.RGB{R: 0x4f, G: 0x2b, B: 0x24})
firefly.SetColor(3, firefly.RGB{R: 0x82, G: 0x5b, B: 0x31})
firefly.SetColor(4, firefly.RGB{R: 0xc5, G: 0x91, B: 0x54})
firefly.SetColor(5, firefly.RGB{R: 0xf0, G: 0xbd, B: 0x77})
firefly.SetColor(6, firefly.RGB{R: 0xfb, G: 0xdf, B: 0x9b})
firefly.SetColor(7, firefly.RGB{R: 0xff, G: 0xf9, B: 0xe4})
firefly.SetColor(8, firefly.RGB{R: 0xbe, G: 0xbb, B: 0xb2})
firefly.SetColor(9, firefly.RGB{R: 0x7b, G: 0xb2, B: 0x4e})
firefly.SetColor(10, firefly.RGB{R: 0x74, G: 0xad, B: 0xbb})
firefly.SetColor(11, firefly.RGB{R: 0x41, G: 0x80, B: 0xa0})
firefly.SetColor(12, firefly.RGB{R: 0x32, G: 0x53, B: 0x5f})
firefly.SetColor(13, firefly.RGB{R: 0x2a, G: 0x23, B: 0x49})
firefly.SetColor(14, firefly.RGB{R: 0x7d, G: 0x38, B: 0x40})
firefly.SetColor(15, firefly.RGB{R: 0xc1, G: 0x6c, B: 0x5b})
firefly.SetColor(16, firefly.RGB{R: 0xe8, G: 0x99, B: 0x73})
}
const ff = @import("firefly");
pub export fn update() void {
setColors()
}
fn setColors() void {
// https://lospec.com/palette-list/eroge-copper
ff.setColor(@enumFromInt(1), ff.RGB{.r = 0x0d, .g = 0x08, .b = 0x0d});
ff.setColor(@enumFromInt(2), ff.RGB{.r = 0x4f, .g = 0x2b, .b = 0x24});
ff.setColor(@enumFromInt(3), ff.RGB{.r = 0x82, .g = 0x5b, .b = 0x31});
ff.setColor(@enumFromInt(4), ff.RGB{.r = 0xc5, .g = 0x91, .b = 0x54});
ff.setColor(@enumFromInt(5), ff.RGB{.r = 0xf0, .g = 0xbd, .b = 0x77});
ff.setColor(@enumFromInt(6), ff.RGB{.r = 0xfb, .g = 0xdf, .b = 0x9b});
ff.setColor(@enumFromInt(7), ff.RGB{.r = 0xff, .g = 0xf9, .b = 0xe4});
ff.setColor(@enumFromInt(8), ff.RGB{.r = 0xbe, .g = 0xbb, .b = 0xb2});
ff.setColor(@enumFromInt(9), ff.RGB{.r = 0x7b, .g = 0xb2, .b = 0x4e});
ff.setColor(@enumFromInt(10), ff.RGB{.r = 0x74, .g = 0xad, .b = 0xbb});
ff.setColor(@enumFromInt(11), ff.RGB{.r = 0x41, .g = 0x80, .b = 0xa0});
ff.setColor(@enumFromInt(12), ff.RGB{.r = 0x32, .g = 0x53, .b = 0x5f});
ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x2a, .g = 0x23, .b = 0x49});
ff.setColor(@enumFromInt(14), ff.RGB{.r = 0x7d, .g = 0x38, .b = 0x40});
ff.setColor(@enumFromInt(15), ff.RGB{.r = 0xc1, .g = 0x6c, .b = 0x5b});
ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xe8, .g = 0x99, .b = 0x73});
}
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/eroge-copper
RGB color1 = {0x0d, 0x08, 0x0d};
set_color(1, color1);
RGB color2 = {0x4f, 0x2b, 0x24};
set_color(2, color2);
RGB color3 = {0x82, 0x5b, 0x31};
set_color(3, color3);
RGB color4 = {0xc5, 0x91, 0x54};
set_color(4, color4);
RGB color5 = {0xf0, 0xbd, 0x77};
set_color(5, color5);
RGB color6 = {0xfb, 0xdf, 0x9b};
set_color(6, color6);
RGB color7 = {0xff, 0xf9, 0xe4};
set_color(7, color7);
RGB color8 = {0xbe, 0xbb, 0xb2};
set_color(8, color8);
RGB color9 = {0x7b, 0xb2, 0x4e};
set_color(9, color9);
RGB color10 = {0x74, 0xad, 0xbb};
set_color(10, color10);
RGB color11 = {0x41, 0x80, 0xa0};
set_color(11, color11);
RGB color12 = {0x32, 0x53, 0x5f};
set_color(12, color12);
RGB color13 = {0x2a, 0x23, 0x49};
set_color(13, color13);
RGB color14 = {0x7d, 0x38, 0x40};
set_color(14, color14);
RGB color15 = {0xc1, 0x6c, 0x5b};
set_color(15, color15);
RGB color16 = {0xe8, 0x99, 0x73};
set_color(16, color16);
}
#include "./vendor/firefly/firefly.c"
BOOT void boot()
{
set_colors();
}
void set_colors()
{
// https://lospec.com/palette-list/eroge-copper
set_color(1, {0x0d, 0x08, 0x0d});
set_color(2, {0x4f, 0x2b, 0x24});
set_color(3, {0x82, 0x5b, 0x31});
set_color(4, {0xc5, 0x91, 0x54});
set_color(5, {0xf0, 0xbd, 0x77});
set_color(6, {0xfb, 0xdf, 0x9b});
set_color(7, {0xff, 0xf9, 0xe4});
set_color(8, {0xbe, 0xbb, 0xb2});
set_color(9, {0x7b, 0xb2, 0x4e});
set_color(10, {0x74, 0xad, 0xbb});
set_color(11, {0x41, 0x80, 0xa0});
set_color(12, {0x32, 0x53, 0x5f});
set_color(13, {0x2a, 0x23, 0x49});
set_color(14, {0x7d, 0x38, 0x40});
set_color(15, {0xc1, 0x6c, 0x5b});
set_color(16, {0xe8, 0x99, 0x73});
}
///|
using @firefly {type Color, type RGB}
///|
pub fn boot() -> Unit {
set_colors()
}
///|
fn set_colors() -> Unit {
// https://lospec.com/palette-list/eroge-copper
@firefly.set_color(Color::from_int(1), RGB::new(0x0d, 0x08, 0x0d));
@firefly.set_color(Color::from_int(2), RGB::new(0x4f, 0x2b, 0x24));
@firefly.set_color(Color::from_int(3), RGB::new(0x82, 0x5b, 0x31));
@firefly.set_color(Color::from_int(4), RGB::new(0xc5, 0x91, 0x54));
@firefly.set_color(Color::from_int(5), RGB::new(0xf0, 0xbd, 0x77));
@firefly.set_color(Color::from_int(6), RGB::new(0xfb, 0xdf, 0x9b));
@firefly.set_color(Color::from_int(7), RGB::new(0xff, 0xf9, 0xe4));
@firefly.set_color(Color::from_int(8), RGB::new(0xbe, 0xbb, 0xb2));
@firefly.set_color(Color::from_int(9), RGB::new(0x7b, 0xb2, 0x4e));
@firefly.set_color(Color::from_int(10), RGB::new(0x74, 0xad, 0xbb));
@firefly.set_color(Color::from_int(11), RGB::new(0x41, 0x80, 0xa0));
@firefly.set_color(Color::from_int(12), RGB::new(0x32, 0x53, 0x5f));
@firefly.set_color(Color::from_int(13), RGB::new(0x2a, 0x23, 0x49));
@firefly.set_color(Color::from_int(14), RGB::new(0x7d, 0x38, 0x40));
@firefly.set_color(Color::from_int(15), RGB::new(0xc1, 0x6c, 0x5b));
@firefly.set_color(Color::from_int(16), RGB::new(0xe8, 0x99, 0x73));
}
function boot()
set_colors()
end
function set_colors()
-- https://lospec.com/palette-list/eroge-copper
firefly.set_color(1, {r=0x0d, g=0x08, b=0x0d});
firefly.set_color(2, {r=0x4f, g=0x2b, b=0x24});
firefly.set_color(3, {r=0x82, g=0x5b, b=0x31});
firefly.set_color(4, {r=0xc5, g=0x91, b=0x54});
firefly.set_color(5, {r=0xf0, g=0xbd, b=0x77});
firefly.set_color(6, {r=0xfb, g=0xdf, b=0x9b});
firefly.set_color(7, {r=0xff, g=0xf9, b=0xe4});
firefly.set_color(8, {r=0xbe, g=0xbb, b=0xb2});
firefly.set_color(9, {r=0x7b, g=0xb2, b=0x4e});
firefly.set_color(10, {r=0x74, g=0xad, b=0xbb});
firefly.set_color(11, {r=0x41, g=0x80, b=0xa0});
firefly.set_color(12, {r=0x32, g=0x53, b=0x5f});
firefly.set_color(13, {r=0x2a, g=0x23, b=0x49});
firefly.set_color(14, {r=0x7d, g=0x38, b=0x40});
firefly.set_color(15, {r=0xc1, g=0x6c, b=0x5b});
firefly.set_color(16, {r=0xe8, g=0x99, b=0x73});
end