Skip to the content.

Base 64

Hacks

DevOps

Popcorn Hack 1

In your notebook, explain the following, along with one application to YOUR work:

A. What is a hex color code? What are some examples?

  • A hex color code is a six character code that uses base 16 and starts with a hashtag. It adjusts R G and B. Examples are like #FFFFFF which is white and #FF0000 which is red. These codes tell what values for the browser or whatever you are using it for to display. (000,000,000) to (255,255,255)

B. What is Base64 and how is it used with images?

  • Base64 is a method of storing data, similar to binary. It uses many characters to encode data. Base64 is not a method of encryption, so it shouldn’t be used for that. It is used to directly embed images into html and css.

C. Why might you use Base64 instead of a regular image file?

  • It helps ensure the file will be displayed across all browsers because base64 doesn’t change display to display. It is also easy to use since it is a text based format and has relatively small file sizes.

Image: base64

This image is being linked to by the markdown code in this cell. But, to store it in my repository and on my computer, it is being stored as base64 for easy storage. This example image has many many different characters that make up the colors of the whole image. It is being displayed within this code cell from markdown and notebooks.