Repository navigation
Mehrfarbiger Text erstellen / multicolor text #444
|
wie kann ich einen mehrfarbigen Text erstellen. So wie auch der Startscreen von PIXELI ist. Leider gelingt mit das nicht, obwohl die KI behauptet es müsse gehen. Habe leider bis jetzt kein BSP gefunden. English version: How can I create multi-colored text? Like the one on the PIXELI start screen. Unfortunately, I haven't managed to do it, even though the AI claims it should be possible. I haven't found an example yet. |
Replies: 1 comment
|
Not with The start screen cheats: it's seven seperate draw calls, one letter each with its own colour (source), and the API only takes one {
"bitmap": {
"data": [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 63903, 63903, 63903, 0, 2021, 0, 63683, 0, 63683, 0, 8191, 8191, 8191, 0, 65254, 0, 0, 0, 65535, 0, 65535, 65535, 65535, 0, 0, 0, 0, 0,
0, 0, 0, 0, 63903, 0, 63903, 0, 2021, 0, 63683, 0, 63683, 0, 8191, 0, 0, 0, 65254, 0, 0, 0, 65535, 0, 0, 65535, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 63903, 63903, 0, 0, 2021, 0, 0, 63683, 0, 0, 8191, 8191, 8191, 0, 65254, 0, 0, 0, 65535, 0, 0, 65535, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 63903, 0, 0, 0, 2021, 0, 63683, 0, 63683, 0, 8191, 0, 0, 0, 65254, 0, 0, 0, 65535, 0, 0, 65535, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 63903, 0, 0, 0, 2021, 0, 63683, 0, 63683, 0, 8191, 8191, 8191, 0, 65254, 65254, 65254, 0, 65535, 0, 0, 65535, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
],
"position": { "x": 0, "y": 0 },
"size": { "width": 32, "height": 8 }
}
}For your own words, draw them in the Pixel Creator in 8x32 mode and paste its array into |
Not with
text- it only takes one colour for the whole string (checked on 2.5.6). It reads onehexColor/colorand every letter gets it - there's no inline colour markup (source).The start screen cheats: it's seven seperate draw calls, one letter each with its own colour (source), and the API only takes one
textper screen. You can send the word as a 32x8bitmapinstead. This one is the finished start screen, pixel for pixel - just POST it to/api/screen:{ "bitmap": { "data": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63903, 63903, 63903, 0, 2021, 0, 63683, 0, 63683, 0, 8191, 8191, 8191, 0, 65254, 0, 0, 0,