Scalable Vector Graphics
Creating High Resolution, Interactive Artwork on Bitcoin Ordinals
Last updated
Creating High Resolution, Interactive Artwork on Bitcoin Ordinals
Last updated
Scalable Vector Graphics, or SVG, is a vector image format made for two-dimensional graphics on the web with support for interactivity and animation.
Bitcoin Ordinals and SVGs go together like peanut butter and jelly. While many Ethereum NFT projects use SVGs for on-chain art because the art can be created through a function in the smart contract to assemble a unique SVG for each token, the usage of SVGs in Bitcoin Ordinals is used to serve a far greater purpose.
Small File Size: For simple graphics, SVGs are up to 80% smaller in file size compared to raster images like JPEGs and PNGs. Bitcoin's block space being both scarce and expensive, SVG empowers artists to create higher quality (and more valuable) work on a smaller budget. It also improves web performance, which is particularly important for mobile devices.
Ultra High Resolution: Unlike raster images (like JPEGs or PNGs), which are made up of pixels, SVGs are vector-based, composing of paths, shapes, and text. This means they can be scaled to any size without losing quality, making them ideal for high resolution artwork.
Ideal for Generative Artwork: SVG images are defined in XML, a markup language used for storing and transporting data. This makes SVGs both readable and modifiable with text editors and also searchable, indexable, and scriptable.
Interactivity and Animation: Unlike JPEGs or PNGs, SVGs can be animated and made interactive using CSS, JavaScript, and HTML Canvas, making them powerful for creating dynamic art and interfaces.
Compatibility: Not only are SVGs compatible with all of the latest web technologies, SVGs are supported by all modern web browsers, making them extremely versatile. Furthermore, text in SVGs is selectable and searchable, unlike text in raster images. Properly coded SVGs are more accessible to people with disabilities.
This is the SVG code for the "Stoic Body__Stoic Body White.svg" trait.
<svg> — This line sets the view box (the part of the canvas visible to the user) with coordinates (0, 0) at the top left corner and (1000, 1000) at the bottom right corner. It specifies the SVG version as 1.1 and the XML namespace needed for SVG.
<path> — This defines a shape using a series of movements and lines. The fill
attribute sets the color of the shape in the hexadecimal color space. The d
attribute contains a series of commands and parameters that define the path. The commands include move (M
), curve (C
), and line (L
). The path is closed with a Z
command.
%%COLOR%% — Is used to customize the color of this path in our javascript file so we only need to inscribe one version of this trait in order to produce unlimited color version.
The integration of Scalable Vector Graphics (SVGs) in Bitcoin Ordinals presents a transformative approach to digital art and NFT creation. SVGs' small file size, ultra-high resolution, and suitability for generative artwork makes them a formidable tool for artists.
Their capabilities for interactivity, animation, and broad compatibility, position SVGs as a key player in the future of Bitcoin Ordinals.