/ tuesdaytooling

Tuesday Tooling: ray.so

Need to include a code snippet in a document or poster? Want it to look nice? You might want to try this.

So What is it?

Ray.so is an online tool that makes code snippets look really good.


So How Do I Use it?

Super simple, just paste your code into the editor and then tweak the settings, language, colours to meet your needs. By setting the language the tool will automatically apply syntax highlighting, useful for sharing code snippets.

So How Do I Get My Code?

Click on Export and we have four options. The first two are to save as a PNG or SVG. The PNG option works well, but the SVG options exports an SVG file which Inkscape opens as a blank file, a shame. The third option is to copy the image to the clipboard, and we can then paste it wherever we need it. The final option creates a URL that you can share with others. They get the code, in an editable format and they can tweak the image to their liking.

What This is Not

As these are basically just images, we have to be careful when using them online. Accessibility users will not be able to see the contents, so careful use of tags and alt is required. For print and posters, this tool is great.
Sharing code with others using this tool is useful, but not if you want the receiver to copy the code. With the URL it is possible, but other outputs are just images.

For use in the classroom, in posters, advertising material etc, this is a top tool.

Happy Hacking