RGBGFX(1) General Commands Manual RGBGFX(1) (NAME) rgbgfx - Game Boy (SYNOPSIS) rgbgfx [-CmhOuVwXYZ] [-v [-v ...]] [-a attrmap | -A] [-B color] [-b base_ids] [-c pal_spec] [--color when] [-d depth] [-i input_tiles] [-L slice] [-l base_pal] [-N nb_tiles] [-n nb_pals] [-o out_file] [-p pal_file | -P] [-q pal_map | -Q] [-r width] [-s nb_colors] [-t tilemap | -T] [-W warning] [-x quantity] file (DESCRIPTION) rgbgfx PNG Game Boy Game Boy Color . rgbgfx PNG 8x8 (tile) 1bpp 2bpp . (tile map) (attribute map) / . (ARGUMENTS) rgbgfx -V --version . . : --verb --verbose --ver --version . `-' ( ) rgbgfx ( ) ( ) . `-' `./-' . . rgbgfx . (hexadecimal) `$' `0x' (octal) `&' `0o' (binary) `%' `0b' . ( `$' `&' (escaping) (quoting) .) ( ) . : `42', `042', `0x2A', `0X2A', `0x2a', `&52', `0o52', `0O052', `0b00101010', `0B101010'. : -a attrmap, --attr-map attrmap (attribute map) "" . ( -m ) ( -N - -), (palette index) . Pan Docs: https://gbdev.io/pandocs/Tile_Maps#bg-map-attributes-cgb-mode-only . ( -t ) (-Z), . -A, --auto-attr-map -a base_path.attrmap ( Automatic output paths). -B color, --background-color color . `#rgb' `#rrggbb' `transparent' . . tilemap (placeholder) . . -b base_ids, --base-tiles base_ids (base IDs) . base_ids 0 255 bank 0 bank 1 . 0 . -C, --color-curve ( ) Game Boy Color . RGB Game Boy Color ( ), . GBC << >> (best effort) . -c pal_spec, --colors pal_spec rgbgfx . pal_spec : (inline palette spec) pal_spec `#' . . `#rgb' `#rrggbb' . `#none' . ( ) . EXAMPLES . (embedded palette spec) pal_spec embedded PNG . PNG (indexed) ..Pq PNG Fl c Cm embedded . DMG pal_spec dmg= DMG . BGP $FF47 DMG ( Pan Docs: https://gbdev.io/pandocs/Palettes.html ): 0-1 0 2-3 1 . 0 () 3 () . pal_spec dmg dmg=E4 0 . . DMG PNG . pal_spec auto PALETTE GENERATION . -c . pal_spec . `format:path' path (`-' ) format . PALETTE SPECIFICATION FORMATS . --color when : `always ' `never' `auto'. `auto' `NO_COLOR: https://no-color.org' `FORCE_COLOR: https://force-color.org' TTY . -d depth, --depth depth (bpp) 1 2 (). ( 2 4) . -h, --help . ( COLUMNS TTY .) -i input_tiles, --input-tileset input_tiles rgbgfx. -o -t . input_tiles 1bpp 2bpp ( -d ) -o . -o . -o . -o -i . -i . -c gbc:input_palette -i input_tiles . rgbgfx . EXAMPLES . REVERSE MODE . -L slice, --slice slice . (sheet) (cel) . . slice `X,Y:W,H': : . . X Y ( ). . -L . -l base_pal, --base-palette base_pal . base_pal 0 255 . 0 . -m, --mirror-tiles / . . ( -a -t ) () . -u. -XY. -N nb_tiles, --nb-tiles nb_tiles VRAM . nb_tiles 0 256 0 . 0 . rgbgfx . -N 0 1 . -n nb_pals, --nb-palettes nb_pals nb_pals . 256 . 8 ( -q ). -O, --group-outputs `base path' -o .Pq Sx Automatic output paths . -o out_file, --output out_file 2bpp 1bpp ( -d) . -p pal_file, --palette pal_file . -P, --auto-palette -p base_path.pal ( Automatic output paths). -q pal_map, --palette-map pal_map . . -Q, --auto-palette-map -q base_path.palmap ( Automatic output paths). -r width, --reverse width rgbgfx "reverse" . PNG Game Boy rgbgfx Game Boy . REVERSE MODE . width . -r -0 . . -s nb_colors, --palette-size nb_colors . nb_colors `1 << depth' ( -d). -t tilemap, --tilemap tilemap . . -a . -u / -m . -T, --auto-tilemap -t base_path.tilemap ( Automatic output paths). -u, --unique-tiles . . ( -t) . rgbgfx . -V, --version . -v, --verbose . : 1. rgbgfx . 2. . 3. . 4. . 5. . . RGBDS . -W warning, --warning warning warning. warning . DIAGNOSTICS . -w . -X, --mirror-x X . -u . -x quantity, --trim-end quantity quantity . "filler" / . quantity . -u -u . -N . -Y, --mirror-y Y . -u . -Z, --columns PNG ( ) ( ). . @at_file . . (`#') . . . `--' at-file . `--' at-file at-file . At-files . . Makefile . "at-files" : (`@') . At : $ rgbgfx -o image.2bpp -t image.tilemap @image.flags image.png `image.flags' `-b 128' . make(1) : %.2bpp %.tilemap: %.flags %.png rgbgfx -o $*.2bpp -t $*.tilemap @$*.flags $*.png (PALETTE SPECIFICATION FORMATS) : act Adobe Photoshop: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577411_pgfId-1070626. aco Adobe Photoshop: https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577411_pgfId-1055819. gbc GBC rgbgfx -p . . gpl GIMP: https://docs.gimp.org/2.10/en/gimp-concepts-palettes.html. hex `rrggbb' png . . psp Paint Shop Pro: https://www.selapa.net/swatches/colors/fileformats.php#psp_pal. ( (BUGS) ) . (PALETTE GENERATION) rgbgfx -c . , (palette swaps) -c . #0 . -c; #1 . ( .) rgbgfx : o PNG ( PNG "indexed" ) PNG . . ( -c -c embedded .) o PNG " (bins)" . #0 RGB . DMG -c dmg=E4 . RGB . rgbgfx "" : . o () () . (luminance) rgbgfx "2126 x red + 7152 x green + 722 x blue". "indexed" PNG `PLTE' . ( GIMP) . NP- <<>> (pagination) rgbgfx (heuristic) "overload-and-remove" . ( .) ( solver) -c rgbgfx ..Sh " (OUTPUT FILES)" rgbgfx Game Boy Game Boy Color . rgbgfx . Pan Docs: https://gbdev.io/pandocs/Graphics . (Tile data) VRAM (padding) . ( "bitplane") . . (-d) bitplane ( ) . (Palette data) . RGB555 - (little-endian) GBC . (padding) 0xFFFF . -s 4 2 x 4 x 5 = 40 . -n ( ) . (Tile map data) (tile map) . - ( ) ( -Z) . / ( ) (padding) . (Attribute map data) GBC . GBC : BG-to-OAM 0 (Vertical Flip) 0= 1= (Horizontal Flip) 0= 1= 0 VRAM 0=Bank 0, 1=Bank 1 - BGP0-7 . (Automatic output paths) rgbgfx . ( -A -a). base_path ( -O -o) . : $ rgbgfx img/player.png -o build/player.2bpp -P $ rgbgfx img/player.png -o build/player.2bpp -p img/player.pal : $ rgbgfx img/player.png -o build/player.2bpp -O -P $ rgbgfx img/player.png -o build/player.2bpp -p build/player.pal (REVERSE MODE) rgbgfx PNG . (ripping) . : (lossy) "" -- Game Boy . ( ). -C, -d, -N, -s, -x, -Z. "At-files" . rgbgfx . (-a, -p, -t) file . : (palettes) rgbgfx DMG (Game Boy ) : . -c -p . (tile data) . (tile map) rgbgfx . (attribute map) rgbgfx () . . . -Werror . -Wno-error . -Werror= (meta warning) . ( : -Werror=obsolete), . -Wno-error= -Werror . "meta" . . . -Wall . -Weverything . . ( -Wobsolete -Wno-obsolete -Wall -Wno-all ). . "no-" . -Wembedded PNG -c embedded . -Weverything . -Wno-obsolete . -Wtrim-nonempty -x . <<>> . -Wall . (EXAMPLES) `tileset.png' ( ) : $ rgbgfx src/res/maps/overworld/tileset.png `tileset.png' 2bpp `tileset.2bpp', `tileset.attrmap' . $ rgbgfx -c '#ffffff,#8d05de, #dc7905,#000000; #fff,#8d05de, #7e0000 , #000' -A -o tileset.2bpp tileset.png `title_screen.png' ( ) 2bpp `title_screen.2bpp', `title_screen.tilemap' . $ rgbgfx -u title_screen.png -o title_screen.2bpp -t title_screen.tilemap `colors.pal', . $ rgbgfx -c '#fff,#ff0,#f80,#000' -p colors.pal . $ rgbgfx tileset.png -o tileset.2bpp -O -P $ rgbgfx level1.png -i tileset.2bpp -c gbc:tileset.pal -t level1.tilemap -a level1.attrmap $ rgbgfx level2.png -i tileset.2bpp -c gbc:tileset.pal -t level2.tilemap -a level2.attrmap GitHub: https://github.com/gbdev/rgbds/issues . (SEE ALSO) rgbasm(1), rgblink(1), rgbfix(1), rgbds(7) Game Boy Pan Docs: https://gbdev.io/pandocs/Graphics, . (HISTORY) rgbgfx stag019 RGBDS . ISSOtm https://github.com/gbdev/rgbds . Linux 6.12.113+deb13-amd64 August 1, 2026 Linux 6.12.113+deb13-amd64