Pal-Liste für das R-Basic mit der Blockgrafik

  • Hallo, gute Tag.

    Gibt es bitte für das PC-Geos/R-Basic für die Blockgrafik eine Pal-Liste?
    Wenn die Blöcke mit 256 Farben angelegt werden müssen sich die Farben ja in irgendeiner RGB-Liste befinden?
    Ich habe zb für den Next-Spectrum eine Pal-Liste die so aussieht:
    JASC-PAL
    0100
    256
    0 0 0
    0 0 85
    0 0 170
    0 0 255
    0 36 0
    0 36 85
    0 36 170
    0 36 255
    0 72 0
    0 72 85
    0 72 170
    0 72 255
    0 109 0
    0 109 85
    0 109 170
    0 109 255
    0 145 0
    0 145 85
    0 145 170
    0 145 255
    0 182 0
    0 182 85
    0 182 170
    0 182 255
    0 218 0
    0 218 85
    0 218 170
    0 218 255
    0 255 0
    0 255 85
    0 255 170
    0 255 255
    36 0 0
    36 0 85
    36 0 170
    36 0 255
    36 36 0
    36 36 85
    36 36 170
    36 36 255
    36 72 0
    36 72 85
    36 72 170
    36 72 255
    36 109 0
    36 109 85
    36 109 170
    36 109 255
    36 145 0
    36 145 85
    36 145 170
    36 145 255
    36 182 0
    36 182 85
    36 182 170
    36 182 255
    36 218 0
    36 218 85
    36 218 170
    36 218 255
    36 255 0
    36 255 85
    36 255 170
    36 255 255
    72 0 0
    72 0 85
    72 0 170
    72 0 255
    72 36 0
    72 36 85
    72 36 170
    72 36 255
    72 72 0
    72 72 85
    72 72 170
    72 72 255
    72 109 0
    72 109 85
    72 109 170
    72 109 255
    72 145 0
    72 145 85
    72 145 170
    72 145 255
    72 182 0
    72 182 85
    72 182 170
    72 182 255
    72 218 0
    72 218 85
    72 218 170
    72 218 255
    72 255 0
    72 255 85
    72 255 170
    72 255 255
    109 0 0
    109 0 85
    109 0 170
    109 0 255
    109 36 0
    109 36 85
    109 36 170
    109 36 255
    109 72 0
    109 72 85
    109 72 170
    109 72 255
    109 109 0
    109 109 85
    109 109 170
    109 109 255
    109 145 0
    109 145 85
    109 145 170
    109 145 255
    109 182 0
    109 182 85
    109 182 170
    109 182 255
    109 218 0
    109 218 85
    109 218 170
    109 218 255
    109 255 0
    109 255 85
    109 255 170
    109 255 255
    145 0 0
    145 0 85
    145 0 170
    145 0 255
    145 36 0
    145 36 85
    145 36 170
    145 36 255
    145 72 0
    145 72 85
    145 72 170
    145 72 255
    145 109 0
    145 109 85
    145 109 170
    145 109 255
    145 145 0
    145 145 85
    145 145 170
    145 145 255
    145 182 0
    145 182 85
    145 182 170
    145 182 255
    145 218 0
    145 218 85
    145 218 170
    145 218 255
    145 255 0
    145 255 85
    145 255 170
    145 255 255
    182 0 0
    182 0 85
    182 0 170
    182 0 255
    182 36 0
    182 36 85
    182 36 170
    182 36 255
    182 72 0
    182 72 85
    182 72 170
    182 72 255
    182 109 0
    182 109 85
    182 109 170
    182 109 255
    182 145 0
    182 145 85
    182 145 170
    182 145 255
    182 182 0
    182 182 85
    182 182 170
    182 182 255
    182 218 0
    182 218 85
    182 218 170
    182 218 255
    182 255 0
    182 255 85
    182 255 170
    182 255 255
    218 0 0
    218 0 85
    218 0 170
    218 0 255
    218 36 0
    218 36 85
    218 36 170
    218 36 255
    218 72 0
    218 72 85
    218 72 170
    218 72 255
    218 109 0
    218 109 85
    218 109 170
    218 109 255
    218 145 0
    218 145 85
    218 145 170
    218 145 255
    218 182 0
    218 182 85
    218 182 170
    218 182 255
    218 218 0
    218 218 85
    218 218 170
    218 218 255
    218 255 0
    218 255 85
    218 255 170
    218 255 255
    255 0 0
    255 0 85
    255 0 170
    255 0 255
    255 36 0
    255 36 85
    255 36 170
    255 36 255
    255 72 0
    255 72 85
    255 72 170
    255 72 255
    255 109 0
    255 109 85
    255 109 170
    255 109 255
    255 145 0
    255 145 85
    255 145 170
    255 145 255
    255 182 0
    255 182 85
    255 182 170
    255 182 255
    255 218 0
    255 218 85
    255 218 170
    255 218 255
    255 255 0
    255 255 85
    255 255 170
    255 255 255
    Danke.
    Gruss

  • Ich weiß ehrlich gesagt nicht, wie R-Basic die 256 Farben mappt. In den Tiefen des SDK findet sich allerdings ein Tool zur Icon-Erstellung, mit dem ich mich dieses Jahr viel beschäftigt habe. Dem ist eine GEOS-Farbpalette zu entnehmen und das könnte / sollte / müsste eigentlich dieselbe sein...

    static const byte GeosColorTable[] = {
    0x00, 0x00, 0x00, /* C_BLACK */
    0x00, 0x00, 0xaa, /* C_BLUE */
    0x00, 0xaa, 0x00, /* C_GREEN */
    0x00, 0xaa, 0xaa, /* C_CYAN */
    0xaa, 0x00, 0x00, /* C_RED */
    0xaa, 0x00, 0xaa, /* C_VIOLET */
    0xaa, 0x55, 0x00, /* C_BROWN */
    0xaa, 0xaa, 0xaa, /* C_LIGHT_GRAY */
    0x55, 0x55, 0x55, /* C_DARK_GRAY */
    0x55, 0x55, 0xff, /* C_LIGHT_BLUE */
    0x55, 0xff, 0x55, /* C_LIGHT_GREEN */
    0x55, 0xff, 0xff, /* C_LIGHT_CYAN */
    0xff, 0x55, 0x55, /* C_LIGHT_RED */
    0xff, 0x55, 0xff, /* C_LIGHT_VIOLET */
    0xff, 0xff, 0x55, /* C_YELLOW */
    0xff, 0xff, 0xff, /* C_WHITE */

    /* 16 shades of grey */

    0x00, 0x00, 0x00, /* index 10 0.0% */
    0x11, 0x11, 0x11, /* 6.7% */
    0x22, 0x22, 0x22, /* 13.3% */
    0x33, 0x33, 0x33, /* 20.0% */
    0x44, 0x44, 0x44, /* index 14 26.7% */
    0x55, 0x55, 0x55, /* 33.3% */
    0x66, 0x66, 0x66, /* 40.0% */
    0x77, 0x77, 0x77, /* 46.7% */
    0x88, 0x88, 0x88, /* index 18 53.3% */
    0x99, 0x99, 0x99, /* 60.0% */
    0xaa, 0xaa, 0xaa, /* 67.7% */
    0xbb, 0xbb, 0xbb, /* 73.3% */
    0xcc, 0xcc, 0xcc, /* index 1c 80.0% */
    0xdd, 0xdd, 0xdd, /* 87.7% */
    0xee, 0xee, 0xee, /* 93.3% */
    0xff, 0xff, 0xff, /* 100.0% */

    /* 8 extra slots */

    0x00, 0x00, 0x00, /* index 20 */
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,
    0x00, 0x00, 0x00,

    /* 216 entries, evenly spaced throughout the RGB space */

    0x00, 0x00, 0x00,
    0x00, 0x00, 0x33,
    0x00, 0x00, 0x66,
    0x00, 0x00, 0x99,
    0x00, 0x00, 0xcc,
    0x00, 0x00, 0xff,
    0x00, 0x33, 0x00,
    0x00, 0x33, 0x33,
    0x00, 0x33, 0x66,
    0x00, 0x33, 0x99,
    0x00, 0x33, 0xcc,
    0x00, 0x33, 0xff,
    0x00, 0x66, 0x00,
    0x00, 0x66, 0x33,
    0x00, 0x66, 0x66,
    0x00, 0x66, 0x99,
    0x00, 0x66, 0xcc,
    0x00, 0x66, 0xff,
    0x00, 0x99, 0x00,
    0x00, 0x99, 0x33,
    0x00, 0x99, 0x66,
    0x00, 0x99, 0x99,
    0x00, 0x99, 0xcc,
    0x00, 0x99, 0xff,
    0x00, 0xcc, 0x00,
    0x00, 0xcc, 0x33,
    0x00, 0xcc, 0x66,
    0x00, 0xcc, 0x99,
    0x00, 0xcc, 0xcc,
    0x00, 0xcc, 0xff,
    0x00, 0xff, 0x00,
    0x00, 0xff, 0x33,
    0x00, 0xff, 0x66,
    0x00, 0xff, 0x99,
    0x00, 0xff, 0xcc,
    0x00, 0xff, 0xff,
    0x33, 0x00, 0x00,
    0x33, 0x00, 0x33,
    0x33, 0x00, 0x66,
    0x33, 0x00, 0x99,
    0x33, 0x00, 0xcc,
    0x33, 0x00, 0xff,
    0x33, 0x33, 0x00,
    0x33, 0x33, 0x33,
    0x33, 0x33, 0x66,
    0x33, 0x33, 0x99,
    0x33, 0x33, 0xcc,
    0x33, 0x33, 0xff,
    0x33, 0x66, 0x00,
    0x33, 0x66, 0x33,
    0x33, 0x66, 0x66,
    0x33, 0x66, 0x99,
    0x33, 0x66, 0xcc,
    0x33, 0x66, 0xff,
    0x33, 0x99, 0x00,
    0x33, 0x99, 0x33,
    0x33, 0x99, 0x66,
    0x33, 0x99, 0x99,
    0x33, 0x99, 0xcc,
    0x33, 0x99, 0xff,
    0x33, 0xcc, 0x00,
    0x33, 0xcc, 0x33,
    0x33, 0xcc, 0x66,
    0x33, 0xcc, 0x99,
    0x33, 0xcc, 0xcc,
    0x33, 0xcc, 0xff,
    0x33, 0xff, 0x00,
    0x33, 0xff, 0x33,
    0x33, 0xff, 0x66,
    0x33, 0xff, 0x99,
    0x33, 0xff, 0xcc,
    0x33, 0xff, 0xff,
    0x66, 0x00, 0x00,
    0x66, 0x00, 0x33,
    0x66, 0x00, 0x66,
    0x66, 0x00, 0x99,
    0x66, 0x00, 0xcc,
    0x66, 0x00, 0xff,
    0x66, 0x33, 0x00,
    0x66, 0x33, 0x33,
    0x66, 0x33, 0x66,
    0x66, 0x33, 0x99,
    0x66, 0x33, 0xcc,
    0x66, 0x33, 0xff,
    0x66, 0x66, 0x00,
    0x66, 0x66, 0x33,
    0x66, 0x66, 0x66,
    0x66, 0x66, 0x99,
    0x66, 0x66, 0xcc,
    0x66, 0x66, 0xff,
    0x66, 0x99, 0x00,
    0x66, 0x99, 0x33,
    0x66, 0x99, 0x66,
    0x66, 0x99, 0x99,
    0x66, 0x99, 0xcc,
    0x66, 0x99, 0xff,
    0x66, 0xcc, 0x00,
    0x66, 0xcc, 0x33,
    0x66, 0xcc, 0x66,
    0x66, 0xcc, 0x99,
    0x66, 0xcc, 0xcc,
    0x66, 0xcc, 0xff,
    0x66, 0xff, 0x00,
    0x66, 0xff, 0x33,
    0x66, 0xff, 0x66,
    0x66, 0xff, 0x99,
    0x66, 0xff, 0xcc,
    0x66, 0xff, 0xff,
    0x99, 0x00, 0x00,
    0x99, 0x00, 0x33,
    0x99, 0x00, 0x66,
    0x99, 0x00, 0x99,
    0x99, 0x00, 0xcc,
    0x99, 0x00, 0xff,
    0x99, 0x33, 0x00,
    0x99, 0x33, 0x33,
    0x99, 0x33, 0x66,
    0x99, 0x33, 0x99,
    0x99, 0x33, 0xcc,
    0x99, 0x33, 0xff,
    0x99, 0x66, 0x00,
    0x99, 0x66, 0x33,
    0x99, 0x66, 0x66,
    0x99, 0x66, 0x99,
    0x99, 0x66, 0xcc,
    0x99, 0x66, 0xff,
    0x99, 0x99, 0x00,
    0x99, 0x99, 0x33,
    0x99, 0x99, 0x66,
    0x99, 0x99, 0x99,
    0x99, 0x99, 0xcc,
    0x99, 0x99, 0xff,
    0x99, 0xcc, 0x00,
    0x99, 0xcc, 0x33,
    0x99, 0xcc, 0x66,
    0x99, 0xcc, 0x99,
    0x99, 0xcc, 0xcc,
    0x99, 0xcc, 0xff,
    0x99, 0xff, 0x00,
    0x99, 0xff, 0x33,
    0x99, 0xff, 0x66,
    0x99, 0xff, 0x99,
    0x99, 0xff, 0xcc,
    0x99, 0xff, 0xff,
    0xcc, 0x00, 0x00,
    0xcc, 0x00, 0x33,
    0xcc, 0x00, 0x66,
    0xcc, 0x00, 0x99,
    0xcc, 0x00, 0xcc,
    0xcc, 0x00, 0xff,
    0xcc, 0x33, 0x00,
    0xcc, 0x33, 0x33,
    0xcc, 0x33, 0x66,
    0xcc, 0x33, 0x99,
    0xcc, 0x33, 0xcc,
    0xcc, 0x33, 0xff,
    0xcc, 0x66, 0x00,
    0xcc, 0x66, 0x33,
    0xcc, 0x66, 0x66,
    0xcc, 0x66, 0x99,
    0xcc, 0x66, 0xcc,
    0xcc, 0x66, 0xff,
    0xcc, 0x99, 0x00,
    0xcc, 0x99, 0x33,
    0xcc, 0x99, 0x66,
    0xcc, 0x99, 0x99,
    0xcc, 0x99, 0xcc,
    0xcc, 0x99, 0xff,
    0xcc, 0xcc, 0x00,
    0xcc, 0xcc, 0x33,
    0xcc, 0xcc, 0x66,
    0xcc, 0xcc, 0x99,
    0xcc, 0xcc, 0xcc,
    0xcc, 0xcc, 0xff,
    0xcc, 0xff, 0x00,
    0xcc, 0xff, 0x33,
    0xcc, 0xff, 0x66,
    0xcc, 0xff, 0x99,
    0xcc, 0xff, 0xcc,
    0xcc, 0xff, 0xff,
    0xff, 0x00, 0x00,
    0xff, 0x00, 0x33,
    0xff, 0x00, 0x66,
    0xff, 0x00, 0x99,
    0xff, 0x00, 0xcc,
    0xff, 0x00, 0xff,
    0xff, 0x33, 0x00,
    0xff, 0x33, 0x33,
    0xff, 0x33, 0x66,
    0xff, 0x33, 0x99,
    0xff, 0x33, 0xcc,
    0xff, 0x33, 0xff,
    0xff, 0x66, 0x00,
    0xff, 0x66, 0x33,
    0xff, 0x66, 0x66,
    0xff, 0x66, 0x99,
    0xff, 0x66, 0xcc,
    0xff, 0x66, 0xff,
    0xff, 0x99, 0x00,
    0xff, 0x99, 0x33,
    0xff, 0x99, 0x66,
    0xff, 0x99, 0x99,
    0xff, 0x99, 0xcc,
    0xff, 0x99, 0xff,
    0xff, 0xcc, 0x00,
    0xff, 0xcc, 0x33,
    0xff, 0xcc, 0x66,
    0xff, 0xcc, 0x99,
    0xff, 0xcc, 0xcc,
    0xff, 0xcc, 0xff,
    0xff, 0xff, 0x00,
    0xff, 0xff, 0x33,
    0xff, 0xff, 0x66,
    0xff, 0xff, 0x99,
    0xff, 0xff, 0xcc,
    0xff, 0xff, 0xff
    };

    Bye,
    MeyerK

  • *Rainer* ist ein fantastischer Programmierer, der die Dinge sehr sauber und von Grund auf angeht. Ich gehe davon aus, dass irgendwo in den Tiefen der Dokumentation die GEOS-Farbpalette erklärt ist und das sollte die sein, die ich auch gepostet habe... (Danke für die Blumen aber ich habe nur mit dem Tool gearbeitet, nicht daran...) Alles andere musst Du ihn selbst fragen!

    Bye,
    MeyerK

  • Erstmal alles, was MeyerK schrieb :thumbup: .

    Zum zweiten kommst du an die Geos-Farbwerte auch in R-Basic. Sollte ungefähr so funktionieren (aus dem Kopf, ungetestet):

  • Hallo,
    genau, 8 Bit Blockgrafik verwendet die "Standardpalette", dass sollte genau die sein, die MeyerK gepostet hat. Wo in den Tiefen des SDK sie definert ist, habe ich auf die Schnelle auch nicht gefunden.
    Rainer

    Es gibt 10 Arten von Menschen - die einen wissen was binär ist, die anderen nicht.

  • Habe jetzt mal mit Purebasic ein Programm geschrieben , ein bisschen umständlich , hat aber geklappt.

    Es werden die ganzen 256 Werte umgesetzt.
    Das ich wohl richtig liege sehe ich in der 2. Reihe die 16 Graustufen und in der 1. Reihe die 16 Farben der GeosTabelle.

    ----------------------------------
    0x00, 0x00, 0x00, /* C_BLACK */
    0x00, 0x00, 0xaa, /* C_BLUE */
    0x00, 0xaa, 0x00, /* C_GREEN */
    0x00, 0xaa, 0xaa, /* C_CYAN */
    ----------------------------------

    Daraus wird :
    ----------------------------------
    0 0 0
    0 0 170
    0 170 0
    0 170 170
    ----------------------------------


    Gruss