Word and Excel – Get More Workspace


This article is an extension of a previous post: https://www.yellowbearjourneys.com/beachreport/microsoft-office-toolbars/

System Level Settings

You need to be able to see more in your viewscreen. My current laptop screen size is about 8 inches high by 14 inches wide. That’s my total maximum workspace, if I could use all of it. That size is not really relevant. What is more relevant is the screen resolution. Mine is set to 1920×1080 pixels, which is the highest mine will go. The higher the resolution, the more I can view in my workspace. To change this in Windows, press Start, then Settings, then search for Display. And go to System settings.

Also, in my display settings, the size of text, apps, etc. is set to 150%. I can set it higher or lower. If I set it lower, I could see more on the screen. However, I won’t be able to make out what I’m seeing without much stronger glasses. And that’s not likely to happen, so 150% it is.

There’s another display setting which you can find by searching for Vision and choosing Ease of Vision settings. Here I could make my text bigger and reduce the amount of text that I see on a screen. I think 100% works well here.

On my screen, there’s a taskbar at the bottom. I keep mine limited to one line. I have a lot of apps that I want on my taskbar. To keep the taskbar to one line, I create folders in My Documents folder and place shortcuts to those apps in those folders. Then I right-click on the taskbar and add each folder. If I want to rearrange the apps in each folder on the taskbar, I open it from the taskbar and drag the apps to rearrange them.

But, how do you create shortcuts of your apps. The easiest way I’ve found to do that, is to start the app. Once it’s running, press Ctrl+Alt+Del. From that screen, click on Task Manager. On the Processes Tab, at the top, there will be a list of active Apps. Click the right-arrow to see more details about the app that you want to create a shortcut for. Right-click on the app and click Go to File Location. Once you’re at that file location, right-click on the app and copy it. (Or select it and Ctrl+c). Now, go to My Documents. Open the folder that you’ve put on your taskbar. Right-Click in that folder and Paste Shortcut. Now, right-click on the Shortcut to rename it. You don’t need Shortcut. You don’t need .exe (it’s just a shortcut name). I know that was several steps, but it seems to always work.

There may be a Scrollbar on the right-hand side that takes up a little bit of workspace when it’s visible. Microsoft decided to hide it. That’s great when you need it out of your way. But how can you tell that there’s a scrollbar to make visible without hovering over every inch of your screen to see if there’s a scrollbar there or not?

To make the scrollbars always visible in Windows, go to the Vision Display settings, and change the setting to Automatically Hide Scrollbars in Windows. Apps may override this setting. And you might have to hover over a Scrollbar to get it to display in the first place.

There are programmatic ways to make the Scrollbar skinnier. I don’t find those helpful. It’s hard enough for me to place the cursor on the Scrollbar as it is.


At this point, you’ve gotten as much screen space as you can at the system level. Now, let’s talk about Word.

Word has a toolbar or banner at the top, right under the menu. To toggle this toolbar on and off, Ctrl+F1. If you need some of those tools handy even with the toolbar off, right-clock on the Customize Quick Access Toolbar. Then choose the tools that you want to always have available. This can be a little confusing the first time. The more you work with this, the easier it becomes. If your Quick Access Toolbar is below the menu (and banner), right-click on it to Show Above Ribbon. This will move the Quick Access Toolbar to the top of the screen, above the Menu. This space was already there, pretty much unused. So, moving your Quick Access Toolbar there will give you more workspace.

I like to see the Navigation Pane – this is a checkbox on the View Menu. I also like to see the Rulers (View Menu again). These take up space, but there helpful enough that I’ll keep them there. You can also view Gridlines, but I find that very unhelpful in Word. I you don’t use them, uncheck them. The Navigation Pane will show up if you Ctrl+F to Find something of if you click Find on the Home Menu.

There’s a down arrow at the top of the Navigation pane which will let you resize it. Or you can hover over the right-edge until you see a double-arrow for your cursor. And that will let you resize it. I like the default size.

I write books. For those documents, I set my page size to 6×9 and all margins to .5 inches. If it’s not a book, I set my margins to .25 all around. This gives me more workspace. This is on the Layout Menu.

Back to the View Menu. Word tries to default to Read Mode. This shows two pages per page. However, it closes the Navigation Pane. So, I normally use Print Layout.

There is Draft Layout which will hide heading and footing. It will also reduce the page break to a thin line. That would give me more workspace. However, especially when I’m writing books, I need to see what it’s looks like on the page.

On the Home Menu, there’s the font and font size. Word’s Default font is Calibri at 11 point. To me, Calibri is blurry. I much prefer Times New Roman, even though it’s a little bigger. I also can’t read 11 point easily, so I use 12 point. Calibri doesn’t have the little extra tics or serifs. Times New Roman does. I like heading fonts without serifs and text with.

To change the default, either click on the right-pointing down arrow on the Home Menu in the Font section, or Ctrl+D. Change the font, then click on Set as Default.

Word also defaults to leaving extra space between lines and paragraphs. I remove that. Click on the right-pointing down arrow on the Home Menu in the Paragraph section. You can also change the paragraph indentation here. Word defaults to no indentation. I set special to first line and .19 inches to indent the first line. I set this as a default. I then select a paragraph with this indentation and right-click on Normal and choose Modify, to change that style. Normal and No Spacing are similar styles. Normal has extra line spacing. No Spacing does not. I set them the same way.


Excel workspace can be increased in many of the same ways as Word. Toolbars work the same way.

On the View Menu, you can show / hide the Formula Bar, Headings, and Gridlines. The Formula Bar is handy for typing long text and formulas (long or short). There’s a down arrow on the Formula Bar which will expand it to the maximum size that you have set. When it’s expanded, that down arrow becomes an up arrow. Click on it, and the Formula Bar is reduced to one visible line. I have my Formula Bar expanded to six lines. You may not need that many. To expand the size of the formula bar, hover over the bottom until your cursor changes to a double-arrow. Then drag the bottom of the Formula Bar down or up.

Headings displays column labels (A, B, …) and row numbers. I have this checked as it comes in very handy for formulas.

Gridlines, help me see individual cells. I find this to be very useful in Excel and detrimental in Word.

There is a Ruler check box. That’s greyed out unless you’re in Page Layout View (from the View Menu).

There is no Navigation Pane in Excel.

You can set your font and font-size. However, this is in a different place. On the File Menu, click Options (or More… then Options). In General, change the Default Font and size under When Creating New Workbooks.

Sometimes in Excel, you’ll want to use a monospaced font, such as Courier New. However, for readability, you may not want to make that your default font. This will make text line up. I prefer Arial for the default font for Excel most of the time, even though it’s bigger than Calibri.

Excel does not have Paragraph settings.

General Guidelines

Before changing something to increase your workspace, ask yourself these questions:

  • How much space are you saving? Is it worth it.
  • Is the text still readable?
  • Is it too much trouble or too confusing?
  • Does it make me more productive? Or more importantly, can you get your work done faster so that you have more time to play. If you’re working faster and still don’t have time to play, something needs to change.

Riding the Bus for Free

Intercity Transit is the bus service for Olympia, Lacey, and Tumwater, WA. They started a program about a year ago to allow everyone to ride the bus for free. If memory serves me correctly, they got a grant to increase ridership, which they’re using to cover the costs of this program. They also calculated that it would be less expensive to not charge anyone than the cost to upgrade their hardware and software to take the money and keep track of it. Taking money involved both the cost of printing and selling tickets and taking money aboard the bus. https://en.wikipedia.org/wiki/Intercity_Transit

I recently had a chance to check out this program. All the literature said that I just had to board the bus and ride. It wasn’t quite that simple. Still, it was easy enough to do. First, though, I had to find the number of the bus that I wanted to take. And I had to have a good idea when that bus ran and where I was going.

First off: Getting the bus number. I went to the website and used the map and schedule to help me figure out which bus I needed to take. I had various options from the transit center. I would also need a bus to take me to the transit center. That bus only ran every hour, and I could walk to the transit center faster. So I did.

Once I arrived at the Olympia Transit Center, I found my bus. I put on my mask (required). And I boarded the bus. My particular bus had just pulled in and they hadn’t had a chance to covid clean it yet. So I was told to get back off. After it was clean, I boarded again.

Soon, the bus was pulling into the Lacey Transit Center. I thought that I had a good idea where I was headed. But now I was confused. So, I asked the driver. We somehow worked it out that I had further to ride. Soon the bus took off again, and eventually, I got to my destination.

When I was done at my destination, I headed back. I took the bus again. This time, I had to wait in an outdoor shelter for the bus to come. That was pretty cold.

The next day, I took a Lyft. I didn’t have quite so long to wait for the bus. I had just missed the one near the place I was staying and it would be another hour. I could have walked to the transit station again, but my legs were tired from the walk yesterday. Lyft only took half as long. I supposed if you counted the amount of time the bus would have taken to get to the Olympia Transit station, Lyft would have only taken 1/3 as long. On the other hand, Lyft wasn’t free.

On the way back, I was going to use Lyft again, but the service said that there was a shortage of drivers in that area and I might not get a ride. So, I used Uber and got a ride that way.

There was a 10 to 15 minute wait for both Lyft and Uber. That’s compared to up to 30 minutes or maybe one hour wait for the bus. Intercity Transit does use the One Ride Away app so that you can see how long you have to wait at your particular stop. Also, several of the stops have schedules on the the walls that you can check for buses that stop there.

Making the bus free, may have increased the ridership. On the other hand covid and/or mask mandates may have decreased it. Neither bus I rode was full, but it wasn’t rush hour. And since I’d never ridden the bus before in Olympia, it was hard to make a comparison.

Would I use the bus again? Yes, if I have the time. The service was good. And it saved me $30. It also saved me the hassle of driving a car. I would have had to rent a car and fill it up when I was done. And that would have cost me much more than $30. Also, rental cars were in high demand right then, so I may not have been able to rent one anyway.

Another nice thing about Intercity Transit is that all the buses use biodiesel. And most of the buses are hybrid-electric. I can’t say the same thing for my Lyft or Uber rides, nor for my potential rental car.

Idea Tree – Book 107


In this postapocalyptic, earthwise, get-rich, elemental, romance, I’ve combined several genres. I’m categorizing this book as a Romance, even though the romantic parties don’t meet each other until 3/5 of the way through the book.

I wrote Idea Tree in bits and pieces with several breaks in between writing. Wow! was it ever hard to make sure that the story was woven together correctly.

It’s the year 2052, the great cataclysm has happened and now people are trying to restore the Earth. OK, so I’m a little optimistic as to how soon we’ll start putting things back together. But then again, perhaps I’m a little pessimistic about how soon that cataclysm has happened. On the third hand, some say that cataclysm is already happening.

On to happier notes: Three friends form Idea Tree to get rich while saving the Earth. Idea Tree will generate ideas that companies and philanthropists will pay them for. These ideas will save the Earth. But, these three friends can’t do it all, so they hire three Idea Generators.

A poor hispanic woman works many long hours and figures out how to start investing what little she can. Eventually she becomes a multi-billionaire (there’s that optimism again). And starts using her money and influence to save the Earth.

She’s hesitant to ask Idea Tree for help for some reason. Yet eventually, she has nowhere else to turn to save the Earth. Ian Mossiman is the Idea Generator who is assigned to help Ultresa Milan create the next idea which will really turn the corner in restoring the Earth to vitality.

And sparks fly – both metaphorically and litterally.


Tongue Twisters or Knot


I recently decided to write a month’s worth of tongue-twisters. Why would I do something so maniacal?  That shouldn’t be too hard to do, I thought? But these tongue-twisters required more of me than writing 31 one-liner diction exercises. These had to be fun. Some had to be syncopated poems. Those which were one-liners insisted on being lists of one-liners. And once I got 31, they just wounded stop coming. Finally I had to shut off the faucet.

Enjoy such tongue-twisters as: Thin’s Shims; Path Cat’s on the Cat Path; Heathcliff’s Eclipse; Frog’s Frock; Swanson the Swan (below); Gargoyle Girl; Charles Chews Chocolate; Dr Jekyll Heckled Hyde’s Spectacular Side; Paradoxical Paradise; and Sasha Sashays.

Tongue Twisters or Knot

Swanson the swan swung
O’er the bolly belly billabong
Out o’er the water he flew
Making a heck of a swell hullabaloo

The lackadaisical lake lacked water
The faster he flew did he falter
And he barely missed three trees
By tucking in his knobby knees

Swanson the swan swung
O’er the bolly belly billabong
He missed a pilaster avoiding master disaster
Landing with haste in the past Pastor’s pasture

SVG Images Made Easy


Well, at least made easier. IMHO, svgs are not easy to understand. svg is a type of image for websites. svg stands for scalable vector graphics, whatever that means.

The important part is that you can manipulate these images in real time. This can also be difficult – it was for me for a long time. It’s possible to alter other types of images in real time. However, svg is what most people use. Canvas is an alternative to svg. But in my opinion, it’s not any easier to understand.

The simplest way to put an svg image on your website is to reference it with the img html tag. But that doesn’t allow you to manipulate it. If instead, you copy the svg image into your html page and make it inline svg, you can manipulate it. Keep reading and I’ll explain how that can be done fairly easily.

An svg image is a text file of commands to draw the image. You can open it with a text editor like Notepad++. This file looks similar to html. It starts with <svg> and ends with </svg>. Actually there may be some code before <svg>. To place your svg image inline, decide where you want it in your html and pasted everything from <svg> to </svg>. Do not include anything before <svg> (or after </svg>). It is not needed or even wanted in some cases in the inline version.

Now that you’ve pasted in those several lines of svg code, save your html file and open it in a browser. Voila, there’s your svg image on the screen. Hint: I find that it helps me immensely if I put comments around the svg. I put <!--SVG--> before the svg and <!--End SVG--> after it.

Now, to the fun part – manipulating the image.

I wanted to take a map of the USA and color each state based on certain criteria. OK, so I wanted to color each state depending on who won during a presidential election. I did this a couple of election cycles ago. It was hard work. Each time, I changed the svg file manually, then I opened it in my picture editor. I made a screen copy and saved that as a png image. Then I referenced that on an img tag in my html page.

Recently, I thought that perhaps I might want to be able to do the same sort of thing at some point in the future. So, I wrote some javascript to simplify that process. I’ve placed that javascript in xg_graph.js and uploaded it to the internet. I tried to make it as simple as possible, so that you don’t need to know much about coding.

You can read about the details of how to use that code at Really Useful Javascript Graphs. I’ll discuss the basics here.

I used the USA svg map from Wikimedia. The particular svg map I used is free to use, no attribution needed. Some svgs are free to use, but require three attributions, plus a brand logo. I think three attributions is asking a little much. But then again, I don’t need that particular svg image yet. Others svg are not free.

You can create your own svg, maybe, using Inkscape or Adobe Illustrator or maybe something else. I can’t draw, so that’s out. And probably the svg will be easier to manipulate if you use one that somebody else has created and gone to the trouble of identifying separate parts of the image.

An svg file consists of the svg or multiple nested svg. Within an svg, you can have a group (g) tag. This groups elements together. If you don’t have <g>…</g> tags, you will probably want to add them, at least one set. Just place <g> at the top at the end of <svg…> and </g> at the bottom before </svg> if you don’t know where to put them. Some of my javascript routines rely on the group tag. There are also shape tags – path, circle, eclipse, line, polyline, polygon, and rect (for rectangle). And that’s pretty much all you need to worry about: svg tag, group tag, and shape tags.

<path class="co" …><title>Colorado</title></path> is the shape for Colorado (CO). It’s identified by both the title and the class. Luckily, the shapes were identified, so that I didn’t have to figure that out.

However, my routines rely on tags being identified by ids. The Wikimedia file doesn’t have ids. But that’s easily resolved. I just add ids to the svg, group, and paths. In this case, I modified the Colorado path to be <path id="svg_co" class="co" …><title>Colorado</title></path>.

Now that my tags have id’s, I can call my xg_svg_modify routine to modify any attribute – class, bgcolor (background color), transparency, title, or text. Text can get complicated, so I manipulate title instead.

You can also modify the size of the svg. And that’s mainly what I use this routine for. It’s more complicated to change the size of an svg than just altering the width and height attributes. It took me a day or two to understand what people on the web were trying to tell me. And even then, I didn’t want to do it manually. So, a routine.

Back to politics. When I find out who won, I can call my x_who_won routine to assign the correct background color to a state shape. Yes, that’s easy enough to do manually when only two people are in the race. But what about a presidential primary when there are 16? And what about election night at 2am, when you’re waiting for the results to come in and you’re way too tired to think straight. When you find out the correct color, you can call xg_svg_modify to update it.

That’s great! But, I want to work with the svg as a whole, rather than one shape at a time. First I need to know the attributes of each shape. So, I call xg_svg_group_init. This gathers the attributes of all shapes in a group. It gathers those attributes into arrays. Arrays can be difficult to work with in javascript. But they were necessary in this case. And, I tried to keep them simple.

You will need to know the index of the array for a certain shape in order to update its attributes: co_index=xg_svg_shape_id_array.indexOf('svg_co'). This returns the index for the Colorado shape in the array. co_bgcolor=xg_svg_shape_bgcolor_array[co_index] returns the background color for Colorado. To update the background color to blue, xg_svg_shape_bgcolor_array_update[co_index]='blue'. You may also want to update the titles by appending the scores. xg_svg_shape_title_array_update[co_index]='CO 55 45'. Then call xg_svg_shapes_update to update the svg.

Maybe you’re not interested in politics. Maybe you just want to randomly color each state. My routine x_color_random_array_init creates the array x_color_random_array. After calling x_color_random_array_init, call xg_svg_shapes_update_bgcolors(x_color_random_array). Then call xg_svg_shapes_update to update the svg.

After Fossil Fuel

Come take a walk on the beach

So, let’s say that one day, tomorrow perhaps, we all stopped using fossil fuel. What do we do then?

In this future scenario, we somehow all have electric vehicles to drive. Perhaps we’ve converted our gas guzzlers. Or perhaps we all take electric public transportation. Perhaps we ride bikes or e-bikes.

There are no more gas stoves or fireplaces. Sure, there are simulated ones powered by electricity, preferably from the sun or perhaps geothermal energy.

Neither natural gas nor propane heat our homes. They’re passive solar, perhaps partly enclosed in the earth to keep the heat in. Perhaps they’re made with straw bales so that they’re super-insulated.

And power-plants no longer burn natural gas or coal to produce energy. Perhaps they burn hemp instead. Or perhaps they don’t burn anything and use renewable resources like sun, wind, and waves.

Whatever else we’re using fossil fuels for, we’re no longer doing . Take plastic, for instance. It’s now all bio-plastic. Bio as in made out of bio-materials. Bio as in bio-degradable.

So, question remains. What do we do then?

We’ve just put millions of people out of work. Those working for powerplants, we retrain to work for green energy. Those drilling the oil, we retrain for other construction work. Those who work at gas stations are probably working in the convenience store part and they’ll still be working in the convenience store part when these service stations have Electric Car chargers rather than gas pumps. Perhaps this is the easiest part of this question to answer.

What do we do with those gas pumps? What do we do with the many, many miles of pipelines? What about all those gas engines that we took out of vehicles to make them electric? What about the tanker trucks and ships? What about the refineries and drilling rigs? What do we do with all those.

Do we do nothing and say, we’ll we’ve gotten the warming of the planet to stabilize and maybe even decrease. Now, climate change won’t be a problem. We know that it will be a problem, it just won’t be such a problem.

Perhaps we need to do something else instead, like help those places which still suffer from climate change. Maybe we start with places with coastline destruction and nation islands which are submerging. Maybe we restore the forests.

And maybe we should. But what about all those fossil fuel relics of an age past? Are they ok to just leave as they are? Or will they deteriorate to the point where they harm the earth further? What can be done about them?

Is anybody already working on this? It might take a particular mindset, like those who work on brownfield remediation. Is it too early to start? It’s always good to invest in our future. Perhaps this is a good investment strategy for some companies, to start figuring out those solutions now.

Why is my Enemy my Enemy

Here’s an age old question: Why is my enemy my enemy? That’s usually followed by: What did I do to them? (Or to offend them)?

I was prompted recently to look at a book that was in my Not to be Published stack. I wrote it in 2004, but didn’t like the ending. I was amazed as a reread what I had written. This book was very apropos for today. It asked these questions:

  • Why does evil always resurface?
  • Why is my enemy my enemy?
  • Who and what will save the day?

Aumanil’s: Three Paths – One History had lots of holes in the story – had to fix that. The reason I had put this book on the Do Not Publish heap was because I didn’t like the ending. As part of the rewrite, I ended up with more information at the end, twice.  So I guess there were holes there also. Now, I really like the ending, wasn’t what I had planned.

Aumanil’s doesn’t so much answer those questions, as it gives us insights into how those in another Cosmos wrestled with them. Their solutions probably aren’t our solutions. But there was one thing they did, which we will probably have to do. Somebody had to walk to where the sun was shining more brightly. For there lay their solution.

This is my 105th book.

Microsoft Office Toolbars


Apparently, there was another upgrade to Microsoft Office 365. And the toolbars changed. Well, I call them toolbars. MS Office calls them menu ribbons, except for the shortcut toolbar which they call the Quick Access Toolbar. The menu ribbon has various tools on it and changes as you select different menus. The Quick Access toolbar lets you place tools/functions that you need to use a lot in one common place that’s always visible – unless you hide the quick access toolbar.

Changes: The Quick Access Toolbar is now below the ribbon, rather than above. Visually, I guess that makes more sense. However, it’s still a change. Also, Undo and Redo were added to the main (Home) menu ribbon. They used to be on the quick access toolbar. Those are the main changes.

Also, turning on and off the ribbon has become more complicated. I often turn the ribbon off (hide the ribbon) so that I can see more on the screen. And I want a quick way to turn it on and off. To  turn the ribbon on, you can right-click on the Quick Access Toolbar and uncheck Collapse the Ribbon. To turn the ribbon off, click on click the down arrow to the right of the ribbon, then right-click in the list of choices, then check Collapse the Ribbon.

Luckily, Allen Wyatt reminded me that Ctrl+F1 toggles the ribbon on and off. Actually, I’m pretty certain that I never knew that. Ctrl+F1 is a lot easier to remember than the various steps that Office visually provides to turn it on and off. He also provides a macro, if you want to place a button on the quick access toolbar to do that.

Redo and Undo: I removed the Redo and Undo Commands from my Home menu. Redo is Ctrl+y, Undo is Ctrl+z. And I always use those keystrokes, rather than clicking the button.

Quick Access Toolbar: I decided to review what was on my quick access toolbars and see if I could use them to optimize the amount of the document or spreadsheet or other office app window. In other words, I wanted to keep the ribbon hidden as much of the time as possible, and just do functions that I do a lot, from the quick access toolbar, since that takes up less space.

If Outlook, I no longer use the ribbon. I’ve placed these commands on my quick access toolbar. To change, right-click and choose customize. Then change the first drop-down from Popular Commands to All Commands. Then Add the commands you want where you want. Use the up and down arrows on the right to order where these commands show up in the ribbon. The commands on my Outlook quick access bar are Reply, Reply All, Forward, Delete, Rules, Send Receive All Folders, Send All, and Print. If you have automatic send/receive set on, you won’t need to add those send commands. Print is Ctrl+p, so I wouldn’t need that one. But there’s plenty of room. I originally added New Email until I noticed that New Email/New Appointment is always present in the working window, depending on whether I’m on email or calendar.

In Word, you may want to hide your quick access toolbar and just toggle the ribbons on and off with Ctrl+F1. However, I need the commands Advanced Find and Find Next, so currently I’ve got them on the quick access toolbar. I think I’ll just modify the Home Ribbon and add them there. Advanced Find allows you to do nifty things like only find whole words. Ctrl+f used to get you there, but now it takes you to the simplified find (that change happened a long time ago). Advanced Find is already on the Home Menu ribbon. Click the down arrow on Find (all the way to the right). I’d like to click once, rather than twice to get there. Find Next is not on the Home Menu ribbon.

In addition to those commands, I currently have Format Painter, Replace, Show All, and Speak on my Quick Access Toolbar. I often need Format Painter, Show All, and Speak, no matter what menu ribbon is currently displayed. So, I may leave well enough alone.

In Excel, I didn’t have a need for the Quick Access Toolbar. If I did, I would add Sort and Filter. With the Formula Bar taking up extra room, I decided to not also have the Quick Access Toolbar taking room.

I don’t use PowerPoint enough to know if there’s a need for the Quick Access Toolbar. I did remove Redo and Undo from the Home Menu. I don’t use other Office Apps, other than Access (database) on rare occasions. Access is in the Professional version. I did use Teams for Work, but so far not on my Personal Computer. If you use OneDrive or OneNote, you may want to customize those apps.

Final Note: If you want the quick access bar back on the top, you can right-click on it and choose Show Quick Access Bar above the Ribbon. It will go back where it used to be and give you even more space in your app’s working window. When you do this, the command titles won’t be displayed, just the icons. But you can hover over them to see what they do, should you ever forget.

Website Color – Contrast, Primary, Random

artists pallette


If the background of an element is dark, you want a light (typically white) text. If it’s light, you want a dark (typically black) text. But what’s dark and what’s light? Technically speaking, light colors are those whose red, green, and blue components are greater then hex 7f (decimal 127). However, our eyes are tricky creatures, and that doesn’t always work. Instead, you need to know the lightness component. You can convert the color to hsl (hue, saturation, light), but that’s rather involved. There’s also a one line if statement I found somewhere on the web which will do the trick instead.


Of course, first you have to get or know the background color of the element. Then you have to convert it from whatever color system it was specified in to rgb. The color system could have been hex, rgb, or an official color name. It could have been a few other color systems. If it is, you’ll need to deal with that. Otherwise, see my functions below to help with this.

Primary Colors

What are the primary colors? Google this and you’ll typically get primary, secondary, and tertiary color names. Some people think of primary colors as the colors of a rainbow. Others think of it as the colors in an 8-crayon box.

My list of primary colors start with those where the hex red, green, and blue values are 00 or FF. This gives us Black, Red, Yellow, Green, Aqua/Cyan, Blue, Magenta/Fuschia, and White. Then I add in those colors where one or more of the values are 7F, for a total of 15 colors.

Random Colors

A Random Color is easy enough to calculate. Some people take a random value for Red (between 0 and 255), one for green, and one for blue. I just take a random number somewhere between the 0 and the maximum number of possible colors.

In Javascript, this is ‘#’+Math.floor(Math.random()*16777215).toString(16).padStart(6,’0’); I may have missed one color at the top-most value, don’t know, don’t really care. toString converts to hex, padStart adds leading zeros, if any are missing.

The real trick, is how to you generate an array of random colors, without any duplicates? What does duplicate mean? I can’t tell the difference between my wife’s navy blue socks and her black ones. I mean they should be labeled. She can. So, duplicate is a matter of how close to another color is too close? I suppose hsl would work better for this. However, I just define it as the red, green, and blue each being within 16 of the red, green, blue of another color. If that doesn’t work for you, you can call my routine passing a different value for tooclose. You’ll probably want to pass a value > 16, like 32.

I also allow you to not accept grey, black, or white values in your array. The array can contain 1000 values. However, if you disallow grey, black, or white, it may contain slightly less than 1000 values. It may also contain slightly less than 1000 values due to dups. I figured 900+ values should be sufficient for most applications.

x_press javascript functions

If you need to add some basic javascript functions to your website to deal with colors, check out my free javascript library. It’s designed to make your website more expressive. And it’s easy to use, even if you don’t know much about javascript.


x=x_color(elementID,foreback) will return the foreground or background color of the element. Foreback can be ‘text’,’foreground’, ‘fore’, ‘fg’ for foreground. Foreback can be ‘background’,’back’, ‘bg’ for background. Any other value will return the background color.
x=x_color_shift(rgb,redshift,greenshift,blueshift) will shift the color. Use positive value for shift for lighter, negative for darker. Specifying 16 or -16 will go slightly lighter or darker.
x_color_primary_array contains primary, secondary, and tertiary colors.x_color_primary_names_array contains the names. x_color_primary_n_array and … names array contain primary colors in sorted order where number of colors is n and n=5,8,15. Brown is actually a red-violet shade, so not included.
x_color_blackx_color_white – black and white, but you can change them to whatever you use for black and white. I was going to set x_color_text and x_color_background to document.body.style.text and document.body.style.backgroundColor, but these would be set in x_press_init. And x_press_init is usually called in <head>. And document.body.style…. is in head. You would need to set your own variables for these in a script after <body>. You might also want to set a variable for document.body.style.borderColor. You can of course you document.body.style…. The only reason for corresponding variables, would be if you can’t recall document.body.style….
x=x_color_convert(fromcolor,tocolor_type) will convert color from one type to another. From type is name, hex, or rgb and is derived from fromcolor. tocolor_type needs to be specified if rgb, otherwise it defaults to hex. tocolor is the returned value.
x=x_color_random_array_init(allowgray,allowblack,allowwhite,tooclose) loads an array of up to 1000 random colors. By default, gray, black, and white are not allowed. The array may contain slightly less than 1000 colors, especially if you disallow gray, black, and white. Also, duplicate colors are not included in the array. Duplicate in this case means that the color is too close to another color in the array. tooclose defaults to 16, meaning the red, green, and blue values are within 16 of each other. You can change tooclose. I suggest increasing it, like to 32. Increasing tooclose raises the chance that the array will contain less than 1000 elements, but you’ll probably still have plenty.
x=x_color_contrast(color) returns a contrasting color. Typically, you have a background color and you want to contrast the (foreground / text) color.
x=x_color_contrast_per_background(x_el,settextcolor=false,setbordercolor=false) returns a contrasting color based on an element’s background. Optionally sets text and/or border colors. This works for elements. It does not work for document.body. To set, document.body.style.color=x_color_contrast(document.body.style.backgroundColor)

Exploring Lost Territory

When I was young, I liked to explore the woods. Got lost a few times, Yet, that didn’t stop my love of the woods. However, I still love the ocean better.

In my 104th book, Criseilish and Bileander live on the tropical island of Vascandola. At five, they become pretend boyfriend/girlfriend so that they can play together all the time. They spend most of their time on the beach or playing together in the village. But one day, when they’re 9, they explore a place in the woods, that Bileander calls Lost Territory.

The woods are dangerous and not many people go into the woods. But Bileander is adventurous. And Criseilish is willing to go along for the fun.

But then she can’t remember what happened that day. She’s sure Bileander is responsible for her forgetting, so she dumps him.

Theirs is the relationship everyone else envies. Can she ever trust him again?

Another Romance, not TMI.

Exploring Lost Territory