Skip to main content

How to Get a Hex Color From an Image and Use It in CSS

· 3 min read
Charly Abraham
Co-Founder, Phoenix Code

Suppose you want a label on your website to match the orange on a trail sign. Which orange should you copy, and will white lettering be readable on it? You can answer both questions using the picture itself. In this example the orange is #FF8C42. Dark text on it measures 7.75:1 for contrast.

Find and fix a trailing comma in JSON

· 2 min read
Charly Abraham
Co-Founder, Phoenix Code

In JSON, a comma tells the reader to expect another value or property. A comma immediately before the closing ] or } is a trailing comma and makes the file invalid. A comma inside quoted text is an ordinary character. Removing every comma can break the file and change your data.

Here’s how to find the extra comma in a list of stops, keep the place name Lake, north intact, and save the corrected file.

How to Convert Markdown to PDF with Page Breaks

· 3 min read
Charly Abraham
Co-Founder, Phoenix Code

To convert a Markdown file to PDF, open it in the Phoenix Code Markdown to PDF Converter, choose Save as PDF, then save from your browser’s print dialog. If you want a section to start on a new page, you can mark that spot in the Markdown.

Try it with a short project README. The finished handout has a file table and a CSS example on page one, followed by a checklist on page two. You can do this in a browser without installing an editor or extension.

Make a Markdown table with aligned columns

· 3 min read
Charly Abraham
Co-Founder, Phoenix Code

A Markdown table starts with a heading row and a row of dashes. A vertical bar, also called a pipe (|), separates the cells. For a numeric column, put a colon after its dashes (---:) to line up the values on the right.

Try it with a walking club’s README. The table needs to keep distances in one column and show the meeting point Gate A | East car park in a single cell.

Why a Unix timestamp shows 1970 in JavaScript

· 2 min read
Charly Abraham
Co-Founder, Phoenix Code

Suppose a log says an event happened at 1735689600. You expect January 1, 2025, but new Date(1735689600) gives you a date in January 1970. That log counts seconds since January 1, 1970 at midnight UTC. JavaScript expects milliseconds when you pass a number to new Date().

There are 1,000 milliseconds in a second. You can check the units in a browser before changing any code.

Why Your HTML Preview Is Missing CSS, Images or JavaScript

· 14 min read
Charly P Abraham
Co-Founder, Phoenix Code

An HTML file can link to CSS, images, and JavaScript without copying those files into it. If a preview is missing styles or images, first check the file paths and the preview permissions. If a button does nothing, check whether scripts are allowed. This guide also helps when CSS is not loading, HTML images are not showing, or JavaScript is not working in HTML.

The examples below use Phoenix HTML Viewer. HTML and CSS written inside the document work by default. Hosted files and JavaScript each need permission in the Viewer. The Viewer reads the HTML file you open; it does not import the files beside it.

How to Convert PNG to PDF for Free Online

· 7 min read
Charly P Abraham
Co-Founder, Phoenix Code

You can turn a PNG screenshot, scanned page or diagram into a PDF without installing software. The Phoenix Code PNG to PDF converter combines still PNG images into one file, with one image per page. Conversion runs locally in your browser, and the downloaded PDF has no watermark. No account or subscription is required.

This guide walks through choosing images, arranging pages and saving the result. For color, resolution and printing details, see what PNG-to-PDF conversion preserves.