Palettes / Loop Hero

Loop Hero

The palette used in Four Quarters Team'sΒ Loop Hero, derived from the contents ofΒ the game's Spriter's Resource page.

πŸ¦€ 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/loop-hero
    set_color(Color::from(1), RGB::new(0x00, 0x00, 0x00));
    set_color(Color::from(2), RGB::new(0x23, 0x23, 0x23));
    set_color(Color::from(3), RGB::new(0x60, 0x22, 0x17));
    set_color(Color::from(4), RGB::new(0x3a, 0x3f, 0x3f));
    set_color(Color::from(5), RGB::new(0x81, 0x59, 0x38));
    set_color(Color::from(6), RGB::new(0x62, 0x64, 0x39));
    set_color(Color::from(7), RGB::new(0x68, 0x6f, 0x6f));
    set_color(Color::from(8), RGB::new(0x49, 0x7a, 0xa7));
    set_color(Color::from(9), RGB::new(0xcd, 0x66, 0x27));
    set_color(Color::from(10), RGB::new(0x87, 0x9b, 0x42));
    set_color(Color::from(11), RGB::new(0xaf, 0x91, 0x56));
    set_color(Color::from(12), RGB::new(0x5e, 0xa2, 0xb0));
    set_color(Color::from(13), RGB::new(0x9f, 0xa0, 0x89));
    set_color(Color::from(14), RGB::new(0xa4, 0xbe, 0xc1));
    set_color(Color::from(15), RGB::new(0xdb, 0xce, 0x2d));
    set_color(Color::from(16), RGB::new(0xff, 0xff, 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/loop-hero
    firefly.SetColor(1, firefly.RGB{R: 0x00, G: 0x00, B: 0x00})
    firefly.SetColor(2, firefly.RGB{R: 0x23, G: 0x23, B: 0x23})
    firefly.SetColor(3, firefly.RGB{R: 0x60, G: 0x22, B: 0x17})
    firefly.SetColor(4, firefly.RGB{R: 0x3a, G: 0x3f, B: 0x3f})
    firefly.SetColor(5, firefly.RGB{R: 0x81, G: 0x59, B: 0x38})
    firefly.SetColor(6, firefly.RGB{R: 0x62, G: 0x64, B: 0x39})
    firefly.SetColor(7, firefly.RGB{R: 0x68, G: 0x6f, B: 0x6f})
    firefly.SetColor(8, firefly.RGB{R: 0x49, G: 0x7a, B: 0xa7})
    firefly.SetColor(9, firefly.RGB{R: 0xcd, G: 0x66, B: 0x27})
    firefly.SetColor(10, firefly.RGB{R: 0x87, G: 0x9b, B: 0x42})
    firefly.SetColor(11, firefly.RGB{R: 0xaf, G: 0x91, B: 0x56})
    firefly.SetColor(12, firefly.RGB{R: 0x5e, G: 0xa2, B: 0xb0})
    firefly.SetColor(13, firefly.RGB{R: 0x9f, G: 0xa0, B: 0x89})
    firefly.SetColor(14, firefly.RGB{R: 0xa4, G: 0xbe, B: 0xc1})
    firefly.SetColor(15, firefly.RGB{R: 0xdb, G: 0xce, B: 0x2d})
    firefly.SetColor(16, firefly.RGB{R: 0xff, G: 0xff, B: 0xff})
}

⚑️ Zig

const ff = @import("firefly");

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

fn setColors() void {
    // https://lospec.com/palette-list/loop-hero
    ff.setColor(@enumFromInt(1), ff.RGB{.r = 0x00, .g = 0x00, .b = 0x00});
    ff.setColor(@enumFromInt(2), ff.RGB{.r = 0x23, .g = 0x23, .b = 0x23});
    ff.setColor(@enumFromInt(3), ff.RGB{.r = 0x60, .g = 0x22, .b = 0x17});
    ff.setColor(@enumFromInt(4), ff.RGB{.r = 0x3a, .g = 0x3f, .b = 0x3f});
    ff.setColor(@enumFromInt(5), ff.RGB{.r = 0x81, .g = 0x59, .b = 0x38});
    ff.setColor(@enumFromInt(6), ff.RGB{.r = 0x62, .g = 0x64, .b = 0x39});
    ff.setColor(@enumFromInt(7), ff.RGB{.r = 0x68, .g = 0x6f, .b = 0x6f});
    ff.setColor(@enumFromInt(8), ff.RGB{.r = 0x49, .g = 0x7a, .b = 0xa7});
    ff.setColor(@enumFromInt(9), ff.RGB{.r = 0xcd, .g = 0x66, .b = 0x27});
    ff.setColor(@enumFromInt(10), ff.RGB{.r = 0x87, .g = 0x9b, .b = 0x42});
    ff.setColor(@enumFromInt(11), ff.RGB{.r = 0xaf, .g = 0x91, .b = 0x56});
    ff.setColor(@enumFromInt(12), ff.RGB{.r = 0x5e, .g = 0xa2, .b = 0xb0});
    ff.setColor(@enumFromInt(13), ff.RGB{.r = 0x9f, .g = 0xa0, .b = 0x89});
    ff.setColor(@enumFromInt(14), ff.RGB{.r = 0xa4, .g = 0xbe, .b = 0xc1});
    ff.setColor(@enumFromInt(15), ff.RGB{.r = 0xdb, .g = 0xce, .b = 0x2d});
    ff.setColor(@enumFromInt(16), ff.RGB{.r = 0xff, .g = 0xff, .b = 0xff});
}

πŸ€ C

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

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/loop-hero
    RGB color1 = {0x00, 0x00, 0x00};
    set_color(1, color1);
    RGB color2 = {0x23, 0x23, 0x23};
    set_color(2, color2);
    RGB color3 = {0x60, 0x22, 0x17};
    set_color(3, color3);
    RGB color4 = {0x3a, 0x3f, 0x3f};
    set_color(4, color4);
    RGB color5 = {0x81, 0x59, 0x38};
    set_color(5, color5);
    RGB color6 = {0x62, 0x64, 0x39};
    set_color(6, color6);
    RGB color7 = {0x68, 0x6f, 0x6f};
    set_color(7, color7);
    RGB color8 = {0x49, 0x7a, 0xa7};
    set_color(8, color8);
    RGB color9 = {0xcd, 0x66, 0x27};
    set_color(9, color9);
    RGB color10 = {0x87, 0x9b, 0x42};
    set_color(10, color10);
    RGB color11 = {0xaf, 0x91, 0x56};
    set_color(11, color11);
    RGB color12 = {0x5e, 0xa2, 0xb0};
    set_color(12, color12);
    RGB color13 = {0x9f, 0xa0, 0x89};
    set_color(13, color13);
    RGB color14 = {0xa4, 0xbe, 0xc1};
    set_color(14, color14);
    RGB color15 = {0xdb, 0xce, 0x2d};
    set_color(15, color15);
    RGB color16 = {0xff, 0xff, 0xff};
    set_color(16, color16);
}

βž• C++

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

BOOT void boot()
{
    set_colors();
}

void set_colors()
{
    // https://lospec.com/palette-list/loop-hero
    set_color(1, {0x00, 0x00, 0x00});
    set_color(2, {0x23, 0x23, 0x23});
    set_color(3, {0x60, 0x22, 0x17});
    set_color(4, {0x3a, 0x3f, 0x3f});
    set_color(5, {0x81, 0x59, 0x38});
    set_color(6, {0x62, 0x64, 0x39});
    set_color(7, {0x68, 0x6f, 0x6f});
    set_color(8, {0x49, 0x7a, 0xa7});
    set_color(9, {0xcd, 0x66, 0x27});
    set_color(10, {0x87, 0x9b, 0x42});
    set_color(11, {0xaf, 0x91, 0x56});
    set_color(12, {0x5e, 0xa2, 0xb0});
    set_color(13, {0x9f, 0xa0, 0x89});
    set_color(14, {0xa4, 0xbe, 0xc1});
    set_color(15, {0xdb, 0xce, 0x2d});
    set_color(16, {0xff, 0xff, 0xff});
}

🐰 MoonBit

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

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

///|
fn set_colors() -> Unit {
  // https://lospec.com/palette-list/loop-hero
  @firefly.set_color(Color::from_int(1), RGB::new(0x00, 0x00, 0x00));
  @firefly.set_color(Color::from_int(2), RGB::new(0x23, 0x23, 0x23));
  @firefly.set_color(Color::from_int(3), RGB::new(0x60, 0x22, 0x17));
  @firefly.set_color(Color::from_int(4), RGB::new(0x3a, 0x3f, 0x3f));
  @firefly.set_color(Color::from_int(5), RGB::new(0x81, 0x59, 0x38));
  @firefly.set_color(Color::from_int(6), RGB::new(0x62, 0x64, 0x39));
  @firefly.set_color(Color::from_int(7), RGB::new(0x68, 0x6f, 0x6f));
  @firefly.set_color(Color::from_int(8), RGB::new(0x49, 0x7a, 0xa7));
  @firefly.set_color(Color::from_int(9), RGB::new(0xcd, 0x66, 0x27));
  @firefly.set_color(Color::from_int(10), RGB::new(0x87, 0x9b, 0x42));
  @firefly.set_color(Color::from_int(11), RGB::new(0xaf, 0x91, 0x56));
  @firefly.set_color(Color::from_int(12), RGB::new(0x5e, 0xa2, 0xb0));
  @firefly.set_color(Color::from_int(13), RGB::new(0x9f, 0xa0, 0x89));
  @firefly.set_color(Color::from_int(14), RGB::new(0xa4, 0xbe, 0xc1));
  @firefly.set_color(Color::from_int(15), RGB::new(0xdb, 0xce, 0x2d));
  @firefly.set_color(Color::from_int(16), RGB::new(0xff, 0xff, 0xff));
}

πŸŒ™ Lua

function boot()
  set_colors()
end

function set_colors()
  -- https://lospec.com/palette-list/loop-hero
  firefly.set_color(1, {r=0x00, g=0x00, b=0x00});
  firefly.set_color(2, {r=0x23, g=0x23, b=0x23});
  firefly.set_color(3, {r=0x60, g=0x22, b=0x17});
  firefly.set_color(4, {r=0x3a, g=0x3f, b=0x3f});
  firefly.set_color(5, {r=0x81, g=0x59, b=0x38});
  firefly.set_color(6, {r=0x62, g=0x64, b=0x39});
  firefly.set_color(7, {r=0x68, g=0x6f, b=0x6f});
  firefly.set_color(8, {r=0x49, g=0x7a, b=0xa7});
  firefly.set_color(9, {r=0xcd, g=0x66, b=0x27});
  firefly.set_color(10, {r=0x87, g=0x9b, b=0x42});
  firefly.set_color(11, {r=0xaf, g=0x91, b=0x56});
  firefly.set_color(12, {r=0x5e, g=0xa2, b=0xb0});
  firefly.set_color(13, {r=0x9f, g=0xa0, b=0x89});
  firefly.set_color(14, {r=0xa4, g=0xbe, b=0xc1});
  firefly.set_color(15, {r=0xdb, g=0xce, b=0x2d});
  firefly.set_color(16, {r=0xff, g=0xff, b=0xff});
end