# Color Text in MMBasic

**URL:** <https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412>\
**Category:** PicoCalc\
**Created:** [August 25, 2025, 11:36pm UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412 "2025-08-25T23:36:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjmason](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/sjmason/32/13672_2.png) [@sjmason](https://forum.clockworkpi.com/u/sjmason)\
**Post date:** [August 25, 2025, 11:36pm UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/1 "2025-08-25T23:36:21Z")

</div>

Has anyone been able to write text to the screen o the PicoCalc in color using the provided MMBasic? If so, do you have a code snipet that shows how?

---

<div class="post-metadata">

**Author:** ![Toml\_12953](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/toml_12953/32/11925_2.png) [@Toml\_12953](https://forum.clockworkpi.com/u/Toml_12953)\
**Post date:** [August 26, 2025, 2:37am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/2 "2025-08-26T02:37:43Z")

</div>

```auto
color rgb(yellow)
print "This is in yellow on black"
color rgb(blue),rgb(white)
print "This is blue on white"
color rgb(green)
print "Back to green on black"

```

---

<div class="post-metadata">

**Author:** ![UtahPilot](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/utahpilot/32/13793_2.png) [@UtahPilot](https://forum.clockworkpi.com/u/UtahPilot)\
**Post date:** [August 26, 2025, 3:11am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/3 "2025-08-26T03:11:40Z")

</div>

Thank you, Tomi. I was just going to color up some of my windows MMBasic programs using its 0 to 15 number system. I am writing these programs on my windows 11 laptop so that I’ll have some of them ready to go when I receive my PicoCalc. I ordered it last week hoping to have it by Christmas.

---

<div class="post-metadata">

**Author:** ![sjmason](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/sjmason/32/13672_2.png) [@sjmason](https://forum.clockworkpi.com/u/sjmason)\
**Post date:** [August 26, 2025, 5:24am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/4 "2025-08-26T05:24:58Z")

</div>

Thank you. It is so simple but I wasn’t getting it right.

---

<div class="post-metadata">

**Author:** ![Toml\_12953](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/toml_12953/32/11925_2.png) [@Toml\_12953](https://forum.clockworkpi.com/u/Toml_12953)\
**Post date:** [August 26, 2025, 11:08am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/5 "2025-08-26T11:08:10Z")

</div>

According to the manual (pg. 105), if the background color is not specified, it should default to black. This is incorrect. If the background color is not specified, it remains the current background color. This works as intended:

```auto
color rgb(yellow)
print "This is in yellow on black"
color rgb(blue),rgb(white)
print "This is blue on white"
color rgb(green),rgb(black)
print "Back to green on black"

```

---

<div class="post-metadata">

**Author:** ![DigitalDreams](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/digitaldreams/32/16007_2.png) [@DigitalDreams](https://forum.clockworkpi.com/u/DigitalDreams)\
**Post date:** [August 26, 2025, 5:03pm UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/6 "2025-08-26T17:03:52Z")

</div>

A few examples of colour via MMBasic….

 ![20250826_175727](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/5/5160bed35ff43833462a3df998fe188efe4471ab.jpeg)

 ![20250826_180101](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/7/70fd05135f0e4ddc35311be66fa57aa6f5c0917e.jpeg)

 ![20250826_175859](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/9/93fd4b348c29ca421e9a74e4d29dc4187bd65cb2.jpeg)

 ![20250826_175828](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/3/3c447f93e7a2fdd00184a2d944cc4e81e12a7429.jpeg)

---

<div class="post-metadata">

**Author:** ![DigitalDreams](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/digitaldreams/32/16007_2.png) [@DigitalDreams](https://forum.clockworkpi.com/u/DigitalDreams)\
**Post date:** [August 26, 2025, 5:14pm UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/7 "2025-08-26T17:14:49Z")

</div>

![20250826_181258](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/4/449c87431af7dd63ca0b3e82b2afb2ff0ce99f8b.jpeg)

 ![20250826_181128](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/8/8c291989691eabf8536b421211ed44b687a1e48a.jpeg)

---

<div class="post-metadata">

**Author:** ![jmdeejay](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/jmdeejay/32/15215_2.png) [@jmdeejay](https://forum.clockworkpi.com/u/jmdeejay)\
**Post date:** [January 3, 2026, 2:47am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/8 "2026-01-03T02:47:07Z")

</div>

Would it be possible to get the code for this “font viewer” program (3rd screenshot)?  
I end up having to go into the documentation and manually calculating which character corresponds to which character code so many times… 😛  
Thank you.

---

<div class="post-metadata">

**Author:** ![DigitalDreams](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/digitaldreams/32/16007_2.png) [@DigitalDreams](https://forum.clockworkpi.com/u/DigitalDreams)\
**Post date:** [January 3, 2026, 9:17am UTC](https://forum.clockworkpi.com/t/color-text-in-mmbasic/19412/9 "2026-01-03T09:17:25Z")

</div>

Absolutely, you may wish to change the last line as returns to my menu program. Note the first character beeps to remind you it’s a black box, not green !. Formatting lost copying from Windows 🙃

```auto

'Character Set

CLS
Dim integer cx, cy
Color RGB(200,200,200)

Font 1,2
For ch=32 To 255
Print Chr$(ch);
Next
Font 1,1

Color RGB(white)
Box 98,268,181,19
Color RGB(green)
Print @(110,272) “Character code =”
Color RGB(cyan)
Print @(12,294) “Use Cursor Keys to Move - Esc to Exit”
Color RGB(white)

cx=9:cy=5
Color RGB(green)
Font 1,2
Print @(cx*16,cy*24)Chr$(cx+32+cy\*20)

Do
Color RGB(white)
Font 1,1
Print @(238,272)cy\*20+cx+32;" "

Color RGB(green)
Font 1,2

k$=Inkey$
Select Case k$

Case Chr$(128) 'up
If cy>0 Then
Color RGB(200,200,200)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
cy=cy-1
Color RGB(green)
If cx=0 And cy=0 Then
Print @(cx*16,cy*24)Chr$(219)
Play tone 2000,2000,20
Else
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
EndIf
EndIf

Case Chr$(129) 'down
If cy<11 Then
Color RGB(200,200,200)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
cy=cy+1
If cy=11 And cx>3 Then cx=3
Color RGB(green)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
EndIf

Case Chr$(130) 'left
If cx>0 Then
Color RGB(200,200,200)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
cx=cx-1
Color RGB(green)
If cx=0 And cy=0 Then
Print @(cx*16,cy*24)Chr$(219)
Play tone 2000,2000,20
Else
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
EndIf
EndIf

Case Chr$(131) 'right
If cx<19 Then
Color RGB(200,200,200)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
cx=cx+1
If cy=11 And cx>3 Then cx=3
Color RGB(green)
Print @(cx*16,cy*24)Chr$(cx+32+cy*20)
EndIf

End Select

Loop Until k$=Chr$(27)
Run “m”
```
