How to Find That New Color Scheme for Your Next Website Design

I’ve been cruising through some new sites – to me at least – to get some ideas on a color scheme for a new website. I’ll have a few posts on color this week, so if you’re looking to find a new color scheme for your next site, stay tuned!

The first site I looked at for color schemes was ColourLovers and I came away duly impressed.

Colors, palettes and patterns can be viewed endlessly. Over 230,000 patterns and over half-a-million color palettes await your scores and comments.

The color community is thriving here with an active forum and lots of colors, patterns and palettes for free downloading.

Once you register with the site – it’s free – check out the palette maker. Under the Palette tab, click on Create New and start dragging colors from the color picker to the five spots just underneath Create a Palette. When you’re ready you can fill in some details for your final palette and add it to the community.

Colors are identified with their RGB and #hex equivalents, so it’s easy enough to plug those values into your css stylesheet or into The GIMP color picker when you need them.

There’s even more fun under the Patterns tab! Over a hundred patterns are ready for you to customize. – what a wonderful site!

Check Your Site Design in the New Chrome Browser and Many Other Browsers

Since the new browser from Google has come out I’ve wanted to see how my various websites look in Chrome.

The fastest way to see how your site designs hold up in various browsers is to sign up for an account at Browsershots.

It’s as easy as ticking off a few boxes to select which browsers you want to view and hitting the Submit button.

As of today you can test your site designs in 31 browsers for Linux, 33 for Windows, 6 for Mac OS, and 11 for BSD. Each operating system is paired with the most popular browsers and some you’ve never heard of, like Dillo, Epiphany, Minefield, Shiretoko and others.

That’s not all! You also get to choose a screen size, the color depth, which javascript version is used or if it’s used, and whether java and flash are enabled or not. If these parameters don’t matter and you just want to look at a screenshot of your design in some different browsers, leave the spin boxes at the default “don’t care” setting.

Now you don’t have to wonder what your designs look like to Mac or Linux or BSD users, or even in the newest version of browsers you don’t use on your PC.

Fatal Error: Allowed Memory Size Exhausted in PHP

Today, I ran into this fatal error when trying to post to a WordPress blog. In Firefox 2 this error message was dumped to the screen:

Fatal error: Allowed memory size of 8388608 bytes exhausted

This error message is saying that the software needed more than 8MB of memory to perform its function. You may need to look in an error log file to read the message as some famous browsers may just give you a blank screen!

Found solutions for fatal memory errors:

If you can’t find your php.ini file, try submitting a help ticket to your host and request them to change the value for “memory_limit” in php.ini to 16M or 24M. Doubling or tripling the default memory allocation should do the trick. This way, any PHP script will have a larger working memory.

Round Numbers to Next Whole Number in PHP

Time for a new php function, ceil().

A client needed to record the hours spent in particular activities by each member. The number of hours spent in assigned activities were to be entered in whole numbers, where partial hours were rounded up to the nearest hour. So, if someone spent an hour and twenty minutes on a particular activity they were to enter 2 hours into the web site form. However, as we all know, directions are not always read, so don’t trust your input.

Validate all database input!

What was the computer going to spit out on the reports when a person entered 1.3 instead of 2? Naturally the output was rounded down to 1 hour instead of up to 2 hours.

To round up all fractional numbers php has a function that allows us to round all fractions up to the next highest whole number: ceil(argument);

Use it like so:

ceil(5.34) produces the value 6, while ceil(5.56) also gives us 6.

You can throw a variable in the parentheses instead of decimals:

$time_spent = ceil($hours);

Using ceil() allowed me to format the data before it was inserted into the database. Now, reports of member activities will indicate the appropriate time spent.