504 members
311 members
1440 members
223 members
4312 members
Creating coloring book pages has never been easier thanks to AI-powered design tools. In this tutorial, and transform text prompts into printable line art using Envato's GraphicsGen—no drawing skills are required!
Whether you're targeting adults seeking intricate, therapeutic designs or children looking for fun, simple illustrations, this tutorial will help you master the process in just a few minutes.
So stop tracing—let AI do all the work! Let's learn how to create a coloring book with AI.
Envato’s GraphicsGen is an AI-powered graphics generator. It lets subscribers turn simple text prompts into illustrations based on 100 different art style choices—everything from flat-style blueprint to 8-bit nostalgia (and more to come!). This means you can use it as an AI coloring book generator.
At the bottom of the interface, you will see a prompt box. Here, you can select a graphic style from the preset image icons showcased in the gallery or choose one from the dropdown menu in the top right-hand corner.
For example, you can select the Charming Storybook art style. Then, add the text description in the prompt box, such as: "Create a highly detailed enchanted forest scene with intricate vines, hidden creatures, and elaborate magical flora, ink outline." Once your prompt is in, hit Generate, and the AI coloring book generator delivers a PNG graphic in seconds.
GraphicsGen offers royalty-free, high-resolution PNG files under your subscription, making them perfect for web, print, and branding projects.
It's part of Envato’s suite of AI tools, including ImageGen for raster images, VideoGen for short video clips, VoiceGen for text-to-speech, and more. These tools make it easy to quickly generate on-brand assets.
Before we begin creating, let’s explore the differences in designing coloring pages for adults versus kids. There are a few key distinctions:
If you can recognize these differences, you will be able to customize the details, line styles, themes, and layout descriptions for your AI coloring book prompts.
Begin by clearly defining the theme of your coloring book. This step helps guide all your creative decisions throughout the process.
For adult audiences, consider themes like:
For children, focus on:
Select a theme and create a brief that includes your target audience, artistic style preference, and the overall mood you want to achieve. This will serve as your guiding principle throughout the creation process.
When you want AI to generate pages for your printable coloring book, you need to make it feel both dynamic and color-ready. Your prompt needs to be specific, descriptive, and tailored to the AI coloring book generator. Here is what your prompt should include:
By tailoring every part of your prompt—from the subject and mood to the point size of the lines and the output format—you will get AI-generated coloring pages that match your vision.
A good prompt = Technical requirements + Art style + Subject matter + Composition notes + Complexity level + Line quality specifications + Background / Exclude elements or lack thereof.
(Technical requirements) "Create a full-bleed A4 format coloring page at 300 DPI + (Art Style) rendered as solid black line art (Subject) a whimsical woodland scene for adults: an ancient oak tree with twisting branches, clusters of mushrooms, hidden woodland creatures, (Composition notes) highly detailed bark texture, stipple shading only. (Line quality) Use a uniform line weight, crisp black outlines (Background / Exclude) on a transparent background, with no shading."
(Technical requirements) "Create a full-bleed A4 format coloring page at 300 DPI + (Art Style) Simple ink doodle (Subject) of a happy unicorn prancing in a meadow, (Composition notes) big shapes and bold outlines, minimal detail, smiling clouds overhead. (Line quality) 0.5 pt black line width (Background / Exclude) on white background, no text, no background noise."
Let's start with coloring book pages for adults. For the sake of this tutorial, we will create different coloring page themes to test out several prompts.
For the first coloring page, select the Adult Coloring Book art style from the GraphicsGen gallery for detailed and intricate designs. GraphicsGen is a great AI line art generator. I chose a 90s nostalgia theme for this concept, featuring items like a Rubik's Cube and a flip phone, set against a floral background. When writing prompts, pay attention to line weight consistency, the distribution of details, and the overall balance of composition. Here's an example of an adult coloring page prompt:
Carefully enter your prompt and click Generate. AI sometimes produces designs with inconsistent line weights or overly complex areas—note these to refine the prompt later. If you find errors, click Generate Another below the rendered image. Correct your prompt and try to generate at least 3-4 different compositions again. Generating multiple works increases the likelihood of finding designs that perfectly match your vision. Once GraphicsGen generates a suitable image, click on the bottom right of the rendered image to download the PNG.
Keeping the Adult Coloring Book art style selected, an elegant cocktail theme was chosen for the second coloring page. Imagine a martini with a curled lemon twist and olive, a mojito fresh with basil sprigs, and a negroni garnished with a vibrant orange slice—all floating in a playful, asymmetrical layout against a celestial backdrop.
Then I described the intricate cosmic scene, weaving in stars, moons, planets, and swirling filigree to give the page a magical feel. All the outlines must be clean, bold, and black, with no speckles or shading, to maintain a crisp and coloring-friendly appearance. Finally, I ran the prompt. Sometimes the results aren't perfect, and the prompt must be fine-tuned. Here's the AI coloring book prompt I worked with:
For the third coloring page, I chose a koi and blossom design. I started by locking in the technical specs—"full-bleed square adult coloring book page, 300 DPI, 3 mm bleed"—so the output is print-ready. Next, described my main subjects and their arrangement—“two elegant koi fish swimming in a perfect yin-yang formation, bodies curving into a balanced flow with long tails spinning around."
Then I nailed down the art style—"intricate hand-drawn pen-and-ink line art, bold crisp black outlines on white, varied line weights for depth, no shading or grayscale." After that, I layered in the decorative touches—"intertwine lush cherry blossoms (no branches) and fill every inch with dynamic water motifs: ripples, swirls, waves, and bubbles." Finally, I specify the line work only, excluding any text, to keep the page clean and ready for coloring. So the prompt reads as:
Another 'coloring book page for adults' concept to try is a skull-and-snake motif. I began by locking in the technical specs: "a square format at 300 DPI with a 3 mm bleed—to guarantee a print-ready layout." Then I defined the focal imagery: "a human skull entwined by two coiling serpents and blooming rose vines."
Followed by the line specs: "a hand-drawn pen-and-ink vector style with thick, clean black outlines and no shading or grayscale, so it reads as pure line art for coloring." To keep the page engaging, I requested intricate scale patterns, skull cracks, detailed petals, and hidden death-themed motifs, such as skull-patterned moths and fallen rose petals. Finally, I filled all negative space with swirling, spiky vines plus rose borders, excluded any text or logos, and clarified that the final deliverable should be optimized for pure line work to achieve high-quality print. The prompt reads:
For the last concept, I went for a psychedelic vibe. I started as usual, locking in the essentials—a square, single-page layout at 300 DPI with bold, uniform strokes and no shading—to guarantee a crisp, print-ready result. From there, I defined the overarching vibe as an "immersive psychedelic tapestry".
I broke it into five layered motif groups (ribbons & spirals, mandala details, organic surreal elements, micro-patterns, and Op-Art panels), each described with vivid verbs (twist, evolve, weave). By spelling out how ribbons morph into fractal spirals, mandalas into interlocking petals, and vines into alien blossoms, the prompt ensures that every negative space is filled with dots, dashes, or checkerboard waves. Finally, I reiterated the need for clean, continuous lines edge-to-edge so that the design remains both seamless and sharply defined. A prompt example:
Switch to the Simple Ink Doodle art style for kids' coloring pages. It's also an excellent option for AI line art generation. Since we will focus on simplicity and bold shapes for this age group, the Simple Ink Doodle style is ideal for creating clean, streamlined designs that are perfect for children. When creating prompts for children's coloring pages, concentrate on the following elements:
Begin by locking in the page specs—a single-page, square format at 300 DPI—to guarantee a crisp, print-ready canvas. Then define the star of the scene (a dynamic, galloping unicorn with a long, flowing mane and tail) and surround it with playful motifs (swirling ribbons, blooming flowers, fluttering butterflies, twinkling stars, bubbling hearts, and bows) to fill every corner with energy.
Next, specify a hand-drawn pen-and-ink vector style—thick, clean black outlines with varied line weights and no shading—to keep the artwork pure line work for easy coloring. Finally, I excluded any text or branding to ensure the illustration stands independently. The prompt reads:
For the second coloring page, let's do an astronaut theme. First, set down the print requirements—a single-page, square layout at 300 DPI—for color-ready art. Next, define the main character of the scene: a young astronaut 'surfing' on a rocket board through a vibrant galaxy.
To spark imagination, the background should be filled with oversized, easy-to-color planets, smiling faces, playful comets, and friendly aliens waving from asteroids. To keep it kid-friendly, every element should be rendered in bold, hand-drawn line art, with thick, crisp outlines of varied weights and no shading. Fun, chunky details such as planet faces, gear buttons, and comet flares will add charm, along with broad, open spaces for coloring. Finally, make sure to exclude any text or branding from the design. The prompt should read something like this:
For this sample, let's work on animal characters. We'll specify a square format at 300 DPI and then build out the scene: two cute animal characters (a cat baker in a chef's hat and apron behind a pastry-filled window, and a dog server in a bow tie holding a steaming cup) set before a simple café façade.
Display pastries, a blank chalkboard menu, and some potted flowers. Ensure you include thick, clean outlines on a transparent background with no shading or grayscale, allowing for pure line art that facilitates easy coloring. For the background, add simple trees and bushes, and exclude any text.
For sample four, a Japanese culture theme was chosen. I began crafting this prompt by setting the essentials—a single-page layout at 300 DPI. Next, I centered the scene around a kawaii kitten in a simple floral kimono behind a sushi counter.
I added clear, chunky kitchen props (rice bowls, bamboo steamer, soy dish, sushi board, and fish accents) and a charming Japanese wall pattern in the background to create context. I specified uniform 1 pt black line art with smooth, rounded strokes and no shading to keep everything bold and kid-friendly, and left generous white space. Finally, I framed it all with a thick inner border set 3 mm from the edge to tie the composition together. This is the AI coloring book prompt:
Here is a fun approach with skeletons. I sketched out the playful concept: three bubbly skeleton characters enjoying a sunny beach day, each engaged in a fun activity (digging with a shovel, tossing a beach ball, splashing in gentle waves) to set a lighthearted, dynamic mood.
Next, I added simple seaside accents—scattered shells, a sand bucket, starfish on the shore, a palm tree bending in the breeze, and a smiling sun overhead—to frame the scene. Finally, I finalized the style guidelines: bold, uniform 1-point black outlines with no shading and clear, open shapes, ensuring the line art remains clean, accessible, and perfectly suited for children.
Congratulations, you now know how to create effective AI prompts for coloring pages for adults and kids, using GraphicsGen as both an AI coloring book generator and an AI line art generator. With this skillset, you’ll be whipping up unique, eye-catching coloring books in a heartbeat.
Just keep your prompts clear and creative, curate your designs carefully, and tune into what your audience wants. Those simple steps are the secret sauce for AI coloring book success. And if you’d like to create your own printable coloring book illustrations, look at How to Create a Coloring Book Style Illustration in Adobe Illustrator.
Now that you've learned how to create a coloring book using AI, your Envato subscription provides access to a vast library of high-quality, easily customizable templates, graphics, and more. You can use these resources to generate your printable coloring book. Here are a few graphics you can explore:
If you're short on time to create AI coloring prompts, visit Envato to download one of their many coloring page collections, such as this one. It includes everything from cozy interiors to blooming flowers.
Mandalas are an excellent option for adult coloring books. Their calming, repetitive patterns help in relaxation and creating mindfulness, making each coloring session a soothing retreat. You can also create your own by following this tutorial: How to Create a Festive Mandala Style Coloring Book Page in Illustrator.
This Halloween doodle coloring pages collection features charming, hand-drawn cartoon characters as fully editable clip art—perfect for Adobe Illustrator or CorelDRAW. With a few clicks, you can easily adjust and recolor each graphic to suit your spooky-season coloring book designs.
If you prefer not to use the AI coloring book generator, download this line art collection for a quick turnaround. The set is suitable for coloring book pages for adults.
This botanical collection of floral line illustrations is an interesting option for crafting stunning adult coloring books. Thanks to its fully editable AI/EPS files, you can easily edit elements to bring your unique design vision to life.
Are you looking to unlock even more creative magic with AI? Check out our other articles for handy tips and clever tricks to get you started with AI coloring book generators and AI line art generators. You’ll be amazed at what you can create for your printable coloring book.
In June 2025 Apple revealed its new visual language, along with the beta launch of iOS 26. Liquid Glass was the name given to their “new and expressive material”, bending light, and distorting UIs. It received a mixed response, and just weeks after its launch we’ve seen Apple dial down their glassy effects to some degree.
We’ve covered CSS glass effects on Tuts+ before, but today we’re going to do things a little differently. Let’s dive into SVG filters!
CSS provides us with the filter
property that allows us to apply visual effects such as blur, brightness, contrast, saturation, and other effects to HTML elements.
However, for more advanced, almost cinematic effects, SVG filters are a better choice. Unlike CSS filters, SVG filters are composed of modular building blocks known as primitives. When these primitives are combined, they produce powerful visual effects which would not be possible with CSS alone.
Some of the effects that can be applied using filters include custom blurs, water or ripple effects, realistic drop shadows, lighting effects, etc.
SVG filters are created using the <filter>
element whose syntax looks like this:
1 |
<filter>
|
2 |
|
3 |
</filter>
|
Just like any other SVG element, the <filter>
element accepts several attributes that control how it behaves and how much space it covers. These attributes determine factors such as position, size, and blur of the filter.
1 |
<svg width="200" height="200"> |
2 |
<filter id="myFilter" x="0" y="0" width="100%" height="100%" filterUnits="objectBoundingBox" primitiveUnits="userSpaceOnUse"/> |
3 |
</svg>
|
id
: used to identify the filter.x
, y
are the positions of the filter relative to the target element.width
and height
: specify the size to be covered by the filter.filterUnits
is the coordinate system for x, y, width, and height.primitiveUnits
defines the coordinate system inside the filter primitivesInside the <filter>
element is where you define the primitives. Primitives are also SVG elements and they include <feGaussianBlur>
, <feOffset>
, <feColorMatrix>
, <feDisplacementMap>
, etc.
In this tutorial, we’ll only focus on the <feGaussianBlur>
and <feDisplacementMap>
filters. These two are commonly used together to create effects such as glass distortion, ripples, and frosted backgrounds.
For example, to blur an element, we use the <feGaussianBlur>
primitive which looks like this:
1 |
<feGaussianBlur in="SourceGraphic" stdDeviation="5" result="blur" /> |
The in
attribute defines the input source of the filter primitive while the stDeviation
determines the strength of the blur. Once we define the SVG filter, we’ll apply it to an HTML element or another SVG by referencing its id using the filter
property.
So for example, suppose we have a green SVG circle that looks like this:
1 |
<svg width="200" height="200"> |
2 |
<circle cx="100" cy="100" r="80" fill="green" /> |
3 |
</svg>
|
If we needed to apply a blur to the SVG circle, we would create a filter containing a <feGaussianBlur>
primitive, and then apply the filter to the circle as shown below.
1 |
<svg width="200" height="200"> |
2 |
<filter id="blur"> |
3 |
<feGaussianBlur in="SourceGraphic" stdDeviation="20"/> |
4 |
</filter>
|
5 |
<circle cx="100" cy="100" r="80" fill="green" filter="url(#blur)"/> |
6 |
</svg>
|
SVG primitives typically have both an input(in
) as well as an output(result
). The output of one primitive is used as input of another primitive hence creating a chain of primitives for more advanced effects.
In this code snippet, in=sourceGraphic
means that the blur will be applied to the original graphic, in this case, the green circle, while the stdDeviation
attribute controls the strength of the blur. The higher the value, the more intense and spread out the blur effect becomes.
The <feImage>
filter primitive is used to bring an external image or SVG fragment into the filter chain. It does not apply any effects, rather it loads an image from a URL or base64 data.
The output is then used by other primitives like the <feDisplacementMap>
to create custom effects such as distortions, lighting, blending, etc.
For example, to load an image URL into the <feImage>
filter primitive, we’ll have something like this:
1 |
<feImage
|
2 |
href="https://example.com/image.png" |
3 |
x="0" y="0" |
4 |
width="100%" height="100%" |
5 |
result="map" /> |
feDisplacementMap
Filter ElementThe <feDisplacementMap>
filter primitive is responsible for creating distortion effects in SVG. It does this by distorting the color values using the pixels of a displacement map( loaded using the <feImage >
filter) to shift pixels of the original graphic.
1 |
<feDisplacementMap
|
2 |
id="disp" |
3 |
in="blur" |
4 |
in2="map" |
5 |
scale="0.8" |
6 |
xChannelSelector="R" |
7 |
yChannelSelector="G" |
8 |
></feDisplacementMap>
|
For example, in the code above, the <feDisplacementMap>
filter primitive takes 2 inputs where:
in="blur"
is the output of the Gaussian blurin2="map"
is the displacement map imageThe xChannelSelector
attribute specifies which color channel from the displacement image is used to displace pixels along the x-axis while the yChannelSelector
attribute specifies which color channel from the displacement image is used to displace pixels along the y-axis.
These channels can either be R(Red), G(Green) B(Blue) and A(Alpha). The scale attributes determine the intensity of the distortion effect.
Now that we know how SVG filters work and how to create them, we can create a liquid glass distortion effect and apply it to an HTML element.
We’ll start with the HTML markup, a simple button and a span element.
1 |
<button class="glass-button"> |
2 |
<span>CRYSTAL</span> |
3 |
</button>
|
To create a realistic glass button, we need three key ingredients:
feGaussian
filter.Let’s add a background image to the page.
1 |
body { |
2 |
height: 150vh; |
3 |
background: url("https://images.unsplash.com/photo-1683657535824-5b570c7a1749?q=80&w=764&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"); |
4 |
background-size: cover; |
5 |
}
|
We’ll also add a simple keyframe animation that will change the background’s position over time, hence creating a smooth floating animation.
1 |
body { |
2 |
height: 150vh; |
3 |
background: url("https://images.unsplash.com/photo-1683657535824-5b570c7a1749?q=80&w=764&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"); |
4 |
background-size: cover; |
5 |
animation: floatBG 15s ease-in-out infinite; |
6 |
}
|
7 |
|
8 |
@keyframes floatBG { |
9 |
0%, |
10 |
100% { |
11 |
background-position: center center; |
12 |
}
|
13 |
25% { |
14 |
background-position: 30% 70%; |
15 |
}
|
16 |
50% { |
17 |
background-position: 70% 30%; |
18 |
}
|
19 |
75% { |
20 |
background-position: 40% 60%; |
21 |
}
|
22 |
}
|
Add these styles to the button.
1 |
.glass-button { |
2 |
position: fixed; |
3 |
top: 50%; |
4 |
left: 50%; |
5 |
transform: translate(-50%, -50%); |
6 |
cursor: pointer; |
7 |
outline: none; |
8 |
width: 350px; |
9 |
height: 180px; |
10 |
border-radius: 999px; |
11 |
|
12 |
}
|
13 |
|
14 |
.glass-button span { |
15 |
font-family: "Orbitron", sans-serif; |
16 |
color: white; |
17 |
font-size: 2.5rem; |
18 |
font-weight: 600; |
19 |
text-transform: uppercase; |
20 |
letter-spacing: 0.1em; |
21 |
|
22 |
}
|
We have positioned the button at the center using fixed:position
so it stays in place when the background animates. This will ensure the glass effect is visually enhanced.
By default, the button has a solid background, we’ll replace it with a transparent gradient and a semi-transparent border to also enhance the glass illusion.
1 |
.glass-button { |
2 |
position: fixed; |
3 |
top: 50%; |
4 |
left: 50%; |
5 |
transform: translate(-50%, -50%); |
6 |
cursor: pointer; |
7 |
outline: none; |
8 |
width: 350px; |
9 |
height: 180px; |
10 |
border-radius: 999px; |
11 |
border: 1px solid rgba(255, 255, 255, 0.3); |
12 |
background: linear-gradient( |
13 |
135deg, |
14 |
rgba(255, 255, 255, 0.2) 0%, |
15 |
rgba(255, 255, 255, 0.08) 50%, |
16 |
rgba(255, 255, 255, 0.03) 100% |
17 |
);
|
18 |
}
|
So far, the button looks like this:
We need to make it more glassy by adding SVG filters.
To create the glass distortion effect with SVGs, we’ll use a combination of blur, displacement, and a texture map. Let’s start by defining the <filter>
element where our primitives will be defined.
1 |
<svg style="position: absolute; width: 0; height: 0;"> |
2 |
<filter id="glassFilter"> |
3 |
</filter>
|
4 |
</svg>
|
Next, we’ll add a Gaussian blur to the source graphic using the <feGaussianBlur>
primitive. We’ll also ensure it’s available for use in the next chaining process by storing its output in the result attribute.
1 |
<feGaussianBlur in="SourceGraphic" stdDeviation="0.02" result="blur" /> |
A good displacement map image should have high contrast and noticeable color variations. This is important because the distortion depends on the intensity of the color channels.
To ensure the displacement image covers the whole filter area, we have defined x,y, width, and height. Depending on the size of the element the filter will be applied to, you will need to adjust these values to achieve the desired result.
1 |
<feImage x="-50%" y="-50%" width="200%" height="200%" result="map"/> |
As you can see in the <feImage>
filter code above, we haven’t set the href
directly because the base64-encoded version of the image would be very long. Instead, we’ll use JavaScript to set the href
dynamically.
Add this code in your JavaScript file
1 |
const feImage = document.querySelector('feImage'); |
2 |
fetch('https://essykings.github.io/JavaScript/map.png') |
3 |
.then((response) => { |
4 |
return response.blob(); |
5 |
})
|
6 |
.then((blob) => { |
7 |
const objURL = URL.createObjectURL(blob); |
8 |
|
9 |
feImage.setAttribute('href', objURL); |
10 |
});
|
Here, we first select the <feImage>
element using querySelector
, then we fetch the image from a hosted URL, convert the response into a Blob
(a binary representation of the image), and then assign the objectURL as the href
value of the <feImage>
.
We now have the blurred content and the image map, so let’s combine them using the <feDisplacmentMap>
filter to get the final glass distortion effect which will be added to the button.
1 |
<feDisplacementMap id="disp" in="blur" in2="map" scale="0.8" xChannelSelector="R" yChannelSelector="G"/> |
Now, the final SVG filter looks like this:
1 |
<svg style="position: absolute; width: 0; height: 0"> |
2 |
<filter id="glass" x="-50%" y="-50%" width="200%" height="200%" primitiveUnits="objectBoundingBox"> |
3 |
<feImage x="-50%" y="-50%" width="200%" height="200%" result="map"/> |
4 |
<feGaussianBlur in="SourceGraphic" stdDeviation="0.02" result="blur"/> |
5 |
<feDisplacementMap id="disp" in="blur" in2="map" scale="0.8" xChannelSelector="R" yChannelSelector="G"/> |
6 |
</filter>
|
7 |
</svg>
|
Apply the SVG glass distortion effect on the button using the backdrop-filter property.
1 |
backdrop-filter: url(#glass); |
Finally, to enhance the interactivity of the glass button, let’s add a zoom effect on hover.
1 |
.glass-button:hover { |
2 |
transform: translate(-50%, -50%) scale(1.05); |
3 |
}
|
Here is the final result of the glass button in action:
We have seen how powerful SVG filters can be, with just a few SVG filter primitives, we have created a realistic glass distortion effect, similar to Apple’s Liquid Glass effect. Now you can use SVG filters to create visual styles directly in your browser.
Our SVG viewer will have the following features:
So, by the end of this tutorial, we’ll have something like this:
The SVG editor will have a text area to add, edit, or paste the SVG code.
1 |
<div class="editor"> |
2 |
<div class="editor-header">SVG Code Editor</div> |
3 |
<textarea
|
4 |
id="svgInput" |
5 |
placeholder="Paste your SVG code here and watch the magic happen..." |
6 |
></textarea>
|
7 |
</div>
|
The preview area will have a preview container where the current SVG code will be injected for preview.
1 |
<div class="preview"> |
2 |
<div class="preview-header">SVG Preview</div> |
3 |
<div class="preview-content"> |
4 |
<div id="previewContainer" class="preview-container"></div> |
5 |
</div>
|
6 |
</div>
|
Okay, let’s start with the building blocks. The HTML markup will look like this:
1 |
<div class="main"> |
2 |
<header>
|
3 |
<h1>SVG Preview Tool</h1> |
4 |
<p>Edit, preview, and export clean, scalable vector art</p> |
5 |
</header>
|
6 |
<div class="container"> |
7 |
<div class="editor"> |
8 |
<div class="editor-header">SVG Code Editor</div> |
9 |
|
10 |
<textarea
|
11 |
id="svgInput" |
12 |
placeholder="Paste your SVG code here and watch the magic happen..." |
13 |
></textarea>
|
14 |
|
15 |
</div>
|
16 |
<div class="preview"> |
17 |
<div class="preview-header">SVG Preview</div> |
18 |
<div class="preview-content"> |
19 |
<div id="previewContainer" class="preview-container"></div> |
20 |
</div>
|
21 |
</div>
|
22 |
</div>
|
23 |
|
24 |
<button id="exportBtn">Export SVG</button> |
25 |
</div>
|
As you saw from the final demo, we want the editor and the preview to appear side by side on large screens and stack vertically on small devices. We'll achieve this layout using Flexbox and media queries.
Let's begin by applying some basic styles to the <body>
and <header>
elements as shown below.
1 |
@import url("https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap"); |
2 |
|
3 |
* { |
4 |
margin: 0; |
5 |
padding: 0; |
6 |
box-sizing: border-box; |
7 |
}
|
8 |
|
9 |
body { |
10 |
display: flex; |
11 |
min-height: 100vh; |
12 |
justify-content: center; |
13 |
padding: 20px; |
14 |
font-family: "DM Mono", monospace; |
15 |
}
|
16 |
|
17 |
header { |
18 |
max-width: 420px; |
19 |
text-align: center; |
20 |
margin-bottom: 40px; |
21 |
}
|
22 |
|
23 |
h1 { |
24 |
font-size: 30px; |
25 |
font-weight: 700; |
26 |
margin-bottom: 8px; |
27 |
}
|
28 |
|
29 |
header p { |
30 |
font-size: 18px; |
31 |
}
|
We'll apply the following styles to ensure all elements are stacked vertically.
1 |
.main { |
2 |
display: flex; |
3 |
flex-direction: column; |
4 |
align-items: center; |
5 |
gap: 24px; |
6 |
width: 100%; |
7 |
max-width: 1000px; |
8 |
height: 90vh; |
9 |
min-height: 700px; |
10 |
margin-top: 50px; |
11 |
}
|
12 |
.container { |
13 |
display: flex; |
14 |
height: calc(100% - 84px); |
15 |
gap: 20px; |
16 |
width: 100%; |
17 |
}
|
We also want the text editor and the preview container to fill the available height of their parent containers.
1 |
.editor { |
2 |
border: 1px solid #7287f2; |
3 |
}
|
4 |
|
5 |
.editor, |
6 |
.preview { |
7 |
width: 50%; |
8 |
display: flex; |
9 |
flex-direction: column; |
10 |
border-radius: 16px; |
11 |
overflow: hidden; |
12 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
13 |
}
|
14 |
|
15 |
.editor-header, |
16 |
.preview-header { |
17 |
padding: 12px 20px; |
18 |
font-weight: 600; |
19 |
font-size: 14px; |
20 |
text-align: center; |
21 |
width: 100%; |
22 |
color: white; |
23 |
|
24 |
}
|
25 |
|
26 |
textarea { |
27 |
/* width: 100%; */
|
28 |
height: 100%; |
29 |
border: none; |
30 |
padding: 20px; |
31 |
font-size: 13px; |
32 |
resize: none; |
33 |
background: #2e3138; |
34 |
color: white; |
35 |
overflow-y: auto; |
36 |
}
|
37 |
|
38 |
textarea:focus { |
39 |
outline: none; |
40 |
}
|
41 |
|
42 |
.preview-container { |
43 |
width: 100%; |
44 |
height: 100%; |
45 |
border-radius: 16px; |
46 |
background-color: #f9fafb; |
47 |
overflow-y: auto; |
48 |
}
|
49 |
|
50 |
.preview-content { |
51 |
flex: 1; |
52 |
padding: 16px; |
53 |
overflow: hidden; |
54 |
}
|
55 |
|
56 |
.svg-container { |
57 |
display: flex; |
58 |
justify-content: center; |
59 |
overflow: hidden; |
60 |
}
|
Finally, let's style the export button, add styles for displaying error messages, and apply media queries for responsiveness.
1 |
.error-message { |
2 |
color: #dc2626; |
3 |
background: #fef2f2; |
4 |
border: 1px solid #fca5a5; |
5 |
padding: 16px; |
6 |
margin: 20px; |
7 |
border-radius: 6px; |
8 |
font-size: 13px; |
9 |
}
|
10 |
|
11 |
button { |
12 |
margin-top: 40px; |
13 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
14 |
color: white; |
15 |
padding: 12px 30px; |
16 |
border: none; |
17 |
border-radius: 8px; |
18 |
cursor: pointer; |
19 |
width: 150px; |
20 |
}
|
21 |
|
22 |
@media (max-width: 768px) { |
23 |
body { |
24 |
padding: 20px; |
25 |
}
|
26 |
|
27 |
.main { |
28 |
width: 100%; |
29 |
height: 100vh; |
30 |
}
|
31 |
|
32 |
.container { |
33 |
flex-direction: column; |
34 |
height: 100%; |
35 |
}
|
36 |
|
37 |
.editor, |
38 |
.preview { |
39 |
width: 100%; |
40 |
height: 50%; |
41 |
}
|
42 |
}
|
Now the SVG tool interface looks like this:
In this section, we'll perform some SVG code validation to ensure that any SVG code added to the editor is parsed before being displayed.
We'll also add a sample SVG code in the editor and display it in the preview area by default.
Let's start by getting the elements from the DOM and assigning them to variables for easy access.
1 |
const svgInput = document.getElementById("svgInput"); |
2 |
const previewContainer = document.getElementById("previewContainer"); |
3 |
const exportBtn = document.getElementById("exportBtn"); |
The next step is to ensure that the SVG code is valid before adding it for preview. Create a function called loadSVG()
that takes an SVG string as an argument.
Inside this function, we will first check if the SVG string is empty. If its empty, we'll display an error message.
1 |
function loadSVG(svgCode) { |
2 |
previewContainer.innerHTML = ""; |
3 |
if (!svgCode.trim()) { |
4 |
showErrorMessage("Enter SVG code to see preview"); |
5 |
return; |
6 |
}}
|
The second form of validation will be done using the DOMParser
to ensure the SVG Code is well formatted XML code.
DOMParser
is an inbuilt interface in JavaScript that allows us to convert XML or HTML strings into a DOM Document object. Once the string is parsed into a DOM, you can query it using standard DOM methods like querySelector, etc. To parse the XML, first create an instance of the DOMParser
API. Then, parse the SVG string using the ParseFromString()
method and set "image/svg+xml" as the MIME type.
1 |
const parser = new DOMParser(); |
2 |
const doc = parser.parseFromString(svgCode, "image/svg+xml"); |
Check for errors by querying the <parserror>
element. If there are no errors, we will extract the <svg>
element and inject it into the preview.
1 |
function loadSVG(svgCode) { |
2 |
previewContainer.innerHTML = ""; |
3 |
if (!svgCode.trim()) { |
4 |
showErrorMessage("Enter SVG code to see preview"); |
5 |
return; |
6 |
}
|
7 |
|
8 |
try { |
9 |
const parser = new DOMParser(); |
10 |
const doc = parser.parseFromString(svgCode, "image/svg+xml"); |
11 |
const parserError = doc.querySelector("parsererror"); |
12 |
if (parserError) |
13 |
throw new Error("XML parsing error: " + parserError.textContent); |
14 |
const svgElement = doc.querySelector("svg"); |
15 |
if (!svgElement) throw new Error("No valid SVG element found"); |
16 |
|
17 |
const container = document.createElement("div"); |
18 |
container.className = "svg-container"; |
19 |
container.innerHTML = svgCode; |
20 |
previewContainer.appendChild(container); |
21 |
} catch (error) { |
22 |
|
23 |
showErrorMessage("Invalid SVG code: " + error.message); |
24 |
}
|
25 |
}
|
We now have a function that validates and displays the SVG code, so the next step is to ensure it runs before the SVG code in the input changes.
Add two event listeners to the textarea element as shown below:
1 |
svgInput.addEventListener("input", function () { |
2 |
loadSVG(this.value); |
3 |
});
|
4 |
svgInput.addEventListener("paste", function () { |
5 |
loadSVG(this.value); |
6 |
});
|
The input event will be triggered whenever you type, delete, or change the contents of the text area, while the paste event will be triggered when you paste the content to the text area.
The final step is to ensure that we have a default SVG when the tool opens. This is great to ensure the user sees how the tool works.
Create a function called loadDefaultSVG()
which looks like this:
1 |
function loadDefaultSVG() { |
2 |
const sampleSvg = `<svg xmlns="https://www.w3.org/2000/svg" width="160" height="190" viewBox="0 0 60 60"><defs><style>.cls-1{fill:#87e64b;}</style></defs><circle class="cls-1" cx="25.56" cy="61.15" r="2.86"/><path class="cls-1" d="M42,41.65l-16.13,1.73c-.3.03-.45-.34-.21-.53l15.78-12.29c1.02-.84,1.68-2.14,1.4-3.54-.28-2.14-2.05-3.54-4.29-3.26l-17.15,2.51c-.3.04-.46-.34-.22-.53l17-12.98c3.35-2.61,3.63-7.73.56-10.71-2.79-2.79-7.27-2.7-10.06.09L1.29,30.01c-1.02,1.12-1.49,2.61-1.21,4.19.47,2.52,2.98,4.19,5.5,3.73l14.77-3.01c.32-.07.49.36.22.54l-16.38,10.49c-2.05,1.3-2.98,3.63-2.33,5.96.65,3.07,3.73,4.84,6.71,4.1l24.49-6.03c.28-.07.48.25.3.47l-3.82,4.72c-1.02,1.3.65,3.07,2.05,2.05l12.58-10.34c2.24-1.86.75-5.5-2.14-5.22h-.03Z"/></svg>`; |
3 |
|
4 |
svgInput.value = sampleSvg; |
5 |
loadSVG(sampleSvg); |
6 |
}
|
7 |
|
8 |
window.addEventListener("load", loadDefaultSVG); |
In the code above, we set a default SVG string as the value of the editor (in the textarea), then we call the loadSVG()
function which in turn renders the SVG in the preview area.
To export the SVG, we'll package it as an SVG file and trigger a download when the export button is clicked.
1 |
function exportSVG() { |
2 |
const blob = new Blob([svgInput.value], { |
3 |
type: "image/svg+xml" |
4 |
});
|
5 |
const url = URL.createObjectURL(blob); |
6 |
const a = document.createElement("a"); |
7 |
a.href = url; |
8 |
a.download = "svg-viewer.svg"; |
9 |
document.body.appendChild(a); |
10 |
a.click(); |
11 |
document.body.removeChild(a); |
12 |
URL.revokeObjectURL(url); |
13 |
}
|
14 |
exportBtn.addEventListener("click", exportSVG); |
And we’re done! Here’s a reminder of the final codepen demo:
We built a fully functional SVG viewer using HTML, CSS, and JavaScript. This simple, yet powerful tool will allow you to preview and export your SVG graphics for use in your projects.
By “color contrast” we’re referring to the difference in brightness between foreground and background colors. In simpler terms, it defines how easy it is for the human eye to recognize text or images on a coloured background.
The Web Content Accessibility Guidelines (WCAG) provide specific recommendations regarding color contrast for text to make web content accessible and visible to people with impaired vision.
It recommends a minimum contrast ratio of 4.5:1 for normal text. For larger text, the minimum recommended contrast ratio is 3:1. According to the WCAG, larger text is defined as 24px or larger for normal-weight fonts and 18.66px or larger for bold text.
For example, if you have a dark background with dark-colored text, the text will not be easily readable, as seen below.
The contrast ratio between two colors is calculated using the following formula.
1 |
contrast ratio = (L1 + 0.05) /( L2+0.05) |
L1
is the relative luminance of the lighter color, and L2
is the relative luminance of the darker color. While higher contrast is generally recommended to meet accessibility standards, moderate contrast is the best as it reduces eye strain.
Luminance, on the other hand, is the perceived brightness of a color, and it's calculated based on RGB values of that color as shown below:
1 |
R0 = R/255 |
2 |
G0 = G/255 |
3 |
B0 = B/255 |
Once we obtain these values, we linearise each component as follows:
1 |
let r = R0 <= 0.03928 ? R0 / 12.92 : Math.pow((R0 + 0.055) / 1.055, 2.4); |
2 |
let g = G0 <= 0.03928 ? G0 / 12.92 : Math.pow((G0 + 0.055) / 1.055, 2.4); |
3 |
let b = B0 <= 0.03928 ? B0 / 12.92 : Math.pow((B0 + 0.055) / 1.055, 2.4); |
Finally, we compute the relative luminance like so:
1 |
Luminance = 0.2126 * R0+0.07152* G0+0.0722*B0 |
Now that we know how to calculate the contrast ratio, let’s build our own color contrast tool!
The HTML structure will have the following elements:
The code for the HTML markup will look like this:
1 |
<div class="container"> |
2 |
<h1>Color Contrast Checker</h1> |
3 |
<div class="color-pickers"> |
4 |
<div class="color-picker"> |
5 |
<label for="text-color">Text Color:</label> |
6 |
<input type="color" id="text-color" value="#000000" /> |
7 |
<input type="text" id="text-color-hex" value="#000000" /> |
8 |
<p id="text-color-error" class="error-message"></p> |
9 |
</div>
|
10 |
|
11 |
<div class="color-picker"> |
12 |
<label for="bg-color">Background Color:</label> |
13 |
<input type="color" id="bg-color" value="#FFFFFF" /> |
14 |
<input type="text" id="bg-color-hex" value="#FFFFFF" /> |
15 |
<p id="bg-color-error" class="error-message"></p> |
16 |
</div>
|
17 |
</div>
|
18 |
|
19 |
<div class="output"> |
20 |
<div class="results"> |
21 |
<div class="results-item"> |
22 |
<h3>WCAG AA</h3> |
23 |
<p>Normal Text: <span id="normal_text_aa">Pass</span></p> |
24 |
<p>Large Text: <span id="large_text_aa">Pass</span></p> |
25 |
</div>
|
26 |
<div class="results-item"> |
27 |
<h3>WCAG AAA</h3> |
28 |
<p>Normal Text: <span id="normal_text_aaa">Pass</span></p> |
29 |
<p>Large Text: <span id="large_text_aaa">Pass</span></p> |
30 |
</div>
|
31 |
</div>
|
32 |
|
33 |
<div id="preview" class="preview"> |
34 |
<p>This is a preview text</p> |
35 |
</div>
|
36 |
|
37 |
<div class="ratio"> |
38 |
<h2>Contrast Ratio: <span id="contrast-ratio"></span></h2> |
39 |
</div>
|
40 |
</div>
|
41 |
|
42 |
<div class="error"> |
43 |
<p id="error-message"></p> |
44 |
</div>
|
45 |
</div>
|
We'll start by adding some basic styles to the body, the enclosing container, and the title.
1 |
body { |
2 |
background-color: #fff; |
3 |
padding: 20px; |
4 |
}
|
5 |
.container { |
6 |
display: flex; |
7 |
flex-direction: column; |
8 |
align-items: center; |
9 |
max-width: 800px; |
10 |
margin: 0 auto; |
11 |
gap: 8px; |
12 |
border-radius: 8px; |
13 |
|
14 |
}
|
15 |
h1 { |
16 |
text-align: center; |
17 |
margin-bottom: 32px; |
18 |
color: #333; |
19 |
}
|
Align the color picker elements using Flexbox to ensure child elements (i.e. the input and label) are stacked vertically.
1 |
.color-pickers { |
2 |
display: flex; |
3 |
gap: 20px; |
4 |
justify-content: center; |
5 |
margin-bottom: 20px; |
6 |
}
|
7 |
.color-picker { |
8 |
display: flex; |
9 |
flex-direction: column; |
10 |
width: 160px; |
11 |
gap: 4px; |
12 |
}
|
Style the inputs and labels as shown below:
1 |
label { |
2 |
font-weight: 600; |
3 |
color: rgb(0, 0, 0, 0.7); |
4 |
}
|
5 |
input[type="color"] { |
6 |
width: 100%; |
7 |
height: 40px; |
8 |
border: 1px solid rgb(0, 0, 0, 0.05); |
9 |
border-radius: 4px; |
10 |
cursor: pointer; |
11 |
}
|
12 |
input[type="text"] { |
13 |
padding: 8px 12px; |
14 |
border: 1px solid rgb(0, 0, 0, 0.05); |
15 |
border-radius: 4px; |
16 |
text-transform: uppercase; |
17 |
}
|
The display area will indicate whether the selected colors have passed the minimum contrast ratio requirement. If they fail, we will show a fail message, otherwise a pass message will be displayed.
Here are the styles for the display area.
1 |
.results { |
2 |
margin-bottom: 20px; |
3 |
display: flex; |
4 |
gap: 20px; |
5 |
justify-content: center; |
6 |
}
|
7 |
.results-item { |
8 |
text-align: center; |
9 |
padding: 15px; |
10 |
min-width: 130px; |
11 |
border: 1px solid rgb(0, 0, 0, 0.05); |
12 |
border-radius: 8px; |
13 |
}
|
14 |
.results-item h3 { |
15 |
margin-bottom: 10px; |
16 |
text-align: center; |
17 |
color: #333; |
18 |
}
|
19 |
.results-item p { |
20 |
margin-bottom: 5px; |
21 |
}
|
22 |
.pass { |
23 |
color: #38a169; |
24 |
font-weight: bold; |
25 |
}
|
26 |
.fail, |
27 |
.error-message { |
28 |
color: #e53e3e; |
29 |
font-weight: bold; |
30 |
}
|
Add these styles to the preview and contrast ratio elements .
1 |
.preview { |
2 |
display: flex; |
3 |
align-items: center; |
4 |
justify-content: center; |
5 |
min-height: 100px; |
6 |
margin-bottom: 20px; |
7 |
font-size: 24px; |
8 |
border: 1px solid rgb(0, 0, 0, 0.05); |
9 |
width: 100%; |
10 |
max-width: 600px; |
11 |
}
|
12 |
|
13 |
.ratio { |
14 |
text-align: center; |
15 |
font-style: italic; |
16 |
color: #333; |
17 |
}
|
We'll also have styles for error messages.
1 |
.error { |
2 |
color: #e53e3e; |
3 |
}
|
4 |
.error-message { |
5 |
display: none; |
6 |
}
|
Our simple interface now looks like this:
To get accurate color contrast ratios, we'll use the WCAG contrast checker API, which provides an easy way to check the contrast between any two colors. The color contrast ratio is obtained by providing the foreground and background color values to the API, as shown below.
1 |
https://webaim.org/resources/contrastchecker/?fcolor=0000FF&bcolor=FFFFFF&api |
Here we are using black for the text and white for the background.
The output is a JSON object that looks something like this:
1 |
{
|
2 |
"ratio": "8.59", |
3 |
"AA": "pass", |
4 |
"AALarge": "pass", |
5 |
"AAA": "pass", |
6 |
"AAALarge": "pass" |
7 |
}
|
A ratio of 8.59 means the two colors pass the minimum color contrast guidelines. The pass status means the colors also pass the WCAG requirements for both normal text (AA) and large text (AA).
The pass on AAA means the contrast ratio passes the most strict compliance level.
Select all the elements we'll be working with.
1 |
const textColorInput = document.getElementById("text-color"); |
2 |
const bgColorInput = document.getElementById("bg-color"); |
3 |
|
4 |
const textColorHex = document.getElementById("text-color-hex"); |
5 |
const bgColorHex = document.getElementById("bg-color-hex"); |
6 |
const textColorError = document.getElementById("text-color-error"); |
7 |
const bgColorError = document.getElementById("bg-color-error"); |
8 |
const normal_text_aa = document.getElementById("normal_text_aa"); |
9 |
const large_text_aa = document.getElementById("large_text_aa"); |
10 |
const normal_text_aaa = document.getElementById("normal_text_aaa"); |
11 |
const large_text_aaa = document.getElementById("large_text_aaa"); |
12 |
const preview = document.getElementById("preview"); |
13 |
const contrastRatio = document.getElementById("contrast-ratio"); |
Next, we'll get the currently selected color values from each of the color picker inputs. Create a function called updateColors
which looks like this:
1 |
function updateColors() { |
2 |
const textColor = textColorInput.value; |
3 |
const bgColor = bgColorInput.value; |
4 |
|
5 |
preview.style.color = textColor; |
6 |
preview.style.backgroundColor = bgColor; |
7 |
|
8 |
}
|
This function gets the current values and applies them to the preview. The selected background color is used as the preview's background while the selected foreground color is applied to the text.
Invoke the updateColors
function to ensure the preview visually reflects how the text appears on the chosen background.
1 |
updateColors(); |
Before calculating the contrast ratio of the selected colors, we'll first need to validate and sync the color values. This will ensure that when a color is selected using the color picker, the corresponding HEX input value is updated and vice versa.
To do that, we'll create two functions, one for validating the foreground and another for validating the background color.
Create a function called updateTextColorFromHex
.
1 |
function updateTextColorFromHex() {} |
Get the current hex value from the text color input.
1 |
let hexValue = textColorHex.value; |
Check if the value provided starts with the # symbol, if it doesn't, append the symbol at the start of the value.
1 |
if (hexValue.charAt(0) !== "#") { |
2 |
hexValue = "#" + hexValue; |
3 |
}
|
Perform another validation to ensure the provided HEX value is a valid and existing color.
1 |
if (!isValidHex(hexValue)) { |
2 |
textColorError.textContent = "incorrect color"; |
3 |
return; |
4 |
}
|
If the hex value of the color provided is invalid, show a message and exit the function. If it's a valid color, clear the error message and sync the input value and the color picker to ensure the text input and the color input both show the same color.
1 |
textColorError.textContent = ""; |
2 |
textColorError.style.display = "block"; |
3 |
textColorInput.value = hexValue; |
4 |
textColorHex.value = hexValue; |
The helper isValidHex
function uses a regular expression to test the input value and it looks like this:
1 |
function isValidHex(hex) { |
2 |
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(hex); |
3 |
}
|
We'll perform a similar validation for the background color.
1 |
function updateBgColorFromHex() { |
2 |
let hexValue = bgColorHex.value; |
3 |
if (hexValue.charAt(0) !== "#") { |
4 |
hexValue = "#" + hexValue; |
5 |
} |
6 |
|
7 |
if (!isValidHex(hexValue)) { |
8 |
bgColorError.textContent = "incorrect color"; |
9 |
bgColorError.style.display = "block"; |
10 |
|
11 |
|
12 |
return; |
13 |
} |
14 |
bgColorError.textContent = ""; |
15 |
bgColorInput.value = hexValue; |
16 |
bgColorHex.value = hexValue; |
17 |
updateColors() |
18 |
} |
It is also important to ensure that when the color or text input change, the corresponding values are updated. We do this by adding input event listeners to the elements.
1 |
textColorHex.addEventListener("input", updateTextColorFromHex); |
2 |
bgColorHex.addEventListener("input", updateBgColorFromHex); |
3 |
|
4 |
textColorInput.addEventListener("input", function () { |
5 |
textColorHex.value = textColorInput.value; |
6 |
updateColors(); |
7 |
});
|
8 |
|
9 |
bgColorInput.addEventListener("input", function () { |
10 |
bgColorHex.value = bgColorInput.value; |
11 |
updateColors(); |
12 |
});
|
The next step is to pass the current foreground and background hex color values to the API.
Create a function called getContrastRatio
, which takes two arguments namely, foreground
and background
.
1 |
function getContrastRatio(foreground, background) { |
2 |
//logic goes here
|
3 |
|
4 |
}
|
Since the API takes the values without the # symbol, we'll remove the # character using the replace()
method, as shown below.
1 |
const fcolor = foreground.replace("#", ""); |
2 |
const bcolor = background.replace("#", ""); |
Here, we are replacing the # symbol with an empty string. For example, if the hex value is #FFFFFF, the output will be FFFFFF.
Append the values to the API string.
1 |
const apiUrl = `https://webaim.org/resources/contrastchecker/? |
2 |
fcolor=${fcolor}&bcolor=${bcolor}&api`; |
Using fetch()
, make a network request to the WebAIMi API and handle any occurring errors gracefully.
1 |
fetch(apiUrl) |
2 |
.then((response) => { |
3 |
if (!response.ok) { |
4 |
throw new Error("Network response was not ok"); |
5 |
}
|
6 |
return response.json(); |
7 |
})
|
If the API response is successful, we'll get a JSON object containing the contrast ratio and the output of the contrast check, either a fail or a pass in this format.
1 |
{
|
2 |
"ratio": "8.59", |
3 |
"AA": "pass", |
4 |
"AALarge": "pass", |
5 |
"AAA": "pass", |
6 |
"AAALarge": "pass" |
7 |
}
|
where:
We'll then update the results to the page by appending them to the appropriate elements.
1 |
normal_text_aa.textContent = data.AA === "pass" ? "Pass" : "Fail"; |
2 |
normal_text_aa.className = data.AA === "pass" ? "pass" : "fail"; |
3 |
|
4 |
large_text_aa.textContent = data.AALarge === "pass" ? "Pass" : "Fail"; |
5 |
large_text_aa.className = data.AALarge === "pass" ? "pass" : "fail"; |
6 |
|
7 |
normal_text_aaa.textContent = data.AAA === "pass" ? "Pass" : "Fail"; |
8 |
normal_text_aaa.className = data.AAA === "pass" ? "pass" : "fail"; |
9 |
|
10 |
large_text_aaa.textContent = data.AAALarge === "pass" ? "Pass" : "Fail"; |
11 |
large_text_aaa.className = data.AAALarge === "pass" ? "pass" : "fail"; |
Here, each result is displayed as either a Pass or Fail, accompanied by styling that uses red for fail and green for pass.
The final step is to update the updateColors()
function to ensure the selected colors are passed to the getContrastRatio()
function.
1 |
function updateColors() { |
2 |
const textColor = textColorInput.value; |
3 |
const bgColor = bgColorInput.value; |
4 |
preview.style.color = textColor; |
5 |
preview.style.backgroundColor = bgColor; |
6 |
getContrastRatio(textColor, bgColor); |
7 |
}
|
Don’t forget to update the contrast ratio by setting the ratio value as the text content.
1 |
contrastRatio.textContent = parseFloat(data.ratio); |
Here is the final demo!
That's a wrap for this tutorial! We have learned how to build a tool that checks contrast ratios to help adhere to WCAG guidelines. Hopefully, you now feel equipped to create more accessible and user-friendly designs.
Before you get cracking on the cinematography, writing dialogue, or thinking about what character arcs you might have, you need to decide what mood you want to get across. It’s the core to any emotionally driven story and that, plus the tone, will influence your overall style and delivery.
Ask yourself:
What is the main emotion you’d like your audience to experience?
How will the mood change through the narrative?
How do you want the audience to feel at key moments in the story?
How do your various characters respond to the emotions in the narrative?
What sounds and visuals could reinforce the emotions you’re aiming for?
How does the setting of your story contribute to the mood?
Two “moody” films with totally different feels to them are Lost in Translation (2003) that has a sort of gentle yearning through the film, and The Witch (2015) that keeps us feeling dread and fear throughout.
Check out some films that have mood as their primary storytelling tool. We’ve got some suggestions for you at the end of the article, but you could try looking at specific directors too, like Andrei Tarkovsky, Jane Campion, and David Lynch who are really great at using cinematic techniques to get their desired mood across.
Once you’ve chosen your mood(s) then you need to make sure the tone fits with it. This could be something surreal, like Eternal Sunshine of the Spotless Mind (2004) or maybe more of a slow burn like The Green Knight (2021). Whatever it is, make sure you set out your stall early on and keep it consistent throughout.
Camera movements and placement can really help with the pacing and emotional weight. Slow, lingering shots make us think, while handheld, jittery camerawork might make us feel tense or uneasy. Some quick examples are:
The Turin Horse (2011) uses long takes and very minimal camera movement which keeps us immersed in a world of stillness and despair.
The Blair Witch Project (1999) was the poster child for shaky, handheld footage to make us feel frightened and like we’re right there in the story.
A Ghost Story (2017) has a lot of static shots and uses symmetrical compositions to feel timeless.
We all know that light and colour influence mood; a dimly lit hallway will make us feel something entirely different to a field bathed in golden sunlight. Here’s a refresher on the basics:
Low key lighting creates tension, unease, and sometimes mystery.
Pastel colours and warm tones are great for nostalgia, romance, or melancholy.
Desaturating your colours gives the audience a feeling of distance and bleakness.
Positioning the characters are within the frame can help to reinforce whatever emotional undercurrents you’ve got going on. In Her (2013) Joaquin Phoenix’s character is quite often in empty spaces, which is supposed to underline his loneliness. If you think about The Lighthouse (2019), there are a lot of tight, claustrophobic compositions that help to intensify the tension between the two main characters. This is also why they chose to shoot in a 1.19:1 aspect ratio, which is even tighter than 4:3 (1.33:1).
In the types of films and TV shows we’re talking about, the main characters usually have some sort of deep, internal dilemma… because they’re not reacting to dramatic events. Back to Lost in Translation, both main characters are having existential crises; Bob is coming to the end of his career, and Charlotte is drifting, without knowing what to do next. Both characters are looking for purpose and connection, and it's this that plays out through the mood, the small interactions between the characters, and even through the moments of quiet.
It’s quality over quantity here because mood-driven stories often benefit from minimal dialogue, but that dialogue needs to really hit home. There are tons of ways for characters to express themselves without using words, such as through their body language or facial expressions.
Silence and being still can be just as powerful as dialogue. Get comfortable with letting the characters exist in their world and develop through interactions and other techniques we’ve mentioned, rather than needing to drive the plot forwards.
Bringing back the same imagery or music motifs can be a great way to reinforce your emotions. Repetition isn’t always literal either, it could be represented by a character stuck in their ways or thoughts, or by a cycle of behaviour. It could also be literal of course!
There might be a place the character goes to, they might perform the same routines… and so on. The rhythm comes from how these scenes feel and how they dictate the mood. If the narrative progresses slowly and smoothly it might reflect an introspective journey, and if it was disjointed then it might show us the person is feeling fragmented or unstable.
It’s not just what you show, what we hear can also manipulate how an audience feels. The score for a film or show should complement the mood you’re going for, without overwhelming it. It’s not just music either, think about sound effects, ambient sound and even the lack of any of those.
Non-diegetic sound: Sound that is added for the audience but doesn’t exist in the world of the characters. This is usually much of the film score.
Diegetic sound: Sound that the characters can hear and is part of their world. For example, if someone was listening to the radio or watching TV, that’s diegetic.
This is a really weighty series that’s very emotionally driven and introspective. 2% of the population disappears without explanation and the show focuses on the people left behind and how they cope.
Joel has a procedure to wipe out all his memories of his ex-girlfriend Clementine. This is a great example of a fragmented narrative because it jumps about all over the place between reality and a memory that’s breaking down.
As a disaster film you’d think this would be packed with action, but nope, it’s all about two sisters, Justine and Claire unravelling in their own ways as a planet called Melancholia is on course to collide with earth.
A crime drama by Jane Campion but very much a slow burn with minimal action. It’s all about mood, atmosphere, and exploring the characters and their relationships. There’s a lovely slow pacing to this and you end up not really focusing on whether the crime is solved.
This is a gentle, nostalgic look at faith and redemption. Ray is a farmer who hears a voice telling him to build a baseball diamond in his cornfield (I know, I know). It’s very sappy, mushy nonsense but it’s still kinda great for that.
This page was written by Marie Gardiner. Marie is a writer, author, and photographer. It was edited by Andrew Blackman. Andrew is a freelance writer and editor, and is a copy editor for Envato Tuts+.
Envato AI ImageGen is the first tool available on Envato Labs, the testing ground for AI image generation tools that are being created for Envato subscribers. (Hint: be on the lookout for more tools soon!)
ImageGen is Envato’s new text-to-image generator designed to help Envato subscribers generate unique, high-quality images for their projects using AI. And it’s available now to try for free!
Using Envato AI ImageGen is really easy. You just need to log in to your Envato account and visit labs.envato.com, or click on “AI Labs” right next to the search bar in Envato and then click on "Generate Images".
Once you're there, all that’s left is to do is type whatever you wish to create in the search bar and click Generate. For the following example, the prompt was "cat cooking an omelette".
ImageGen will then provide a few styles using the prompt. If you're drawn to a specific style, you can click on an image and then click on Use Style to get new images based on it.
If you're happy and wish to download it, simply click on the Download button and you'll automatically get a JPG file.
Additionally, if you want to generate a different prompt, you only need to write it in the bar at the bottom of the screen, and you'll get the new styles to choose from. Your previous prompts will be shown below, so you won’t lose any work.
Start with simple prompts. Initially, use basic terms like “sunset,” “forest,” or “cat.” This approach helps you understand the range of styles and capabilities of the tool. Once you're familiar with it, you can start experimenting with more complex ideas and describing the subject in more detail, e.g describe the scene, time of day, elements you want included, or expressions.
But maybe you're wondering, "How can I get the specific image I have in mind?" Once you know what you’re looking for, refine your prompt by adding more detail. Describe the scene, mood, objects, and any specific elements you want to include. The more detailed your description, the closer the result will be to your vision. For example, instead of just “cat,” try “a fluffy white cat under a blooming cherry tree at sunrise.”
To improve the quality of the images you generate, practice and experimentation are key. Vary your prompts, observe the outcomes, and adjust accordingly. Detailed and creative descriptions often yield the most striking images.
Now you know how easy it is to create unique AI-generated images with your Envato subscription. Make sure to keep exploring the new tool and playing with different prompts. If you'd like to learn more about AI tools, we've got the best content for you:
Looking to create your next AI masterpiece? Or do you simply want to discover fantastic assets to use in your next creative project? Finding the best AI tool for graphic design will help you take your ideas to the next level, and many of the latest and best AI image generators are not only easy to use but often free to try out as well.
Here, creative people can find our edit of the best AI image generators of 2025, from Midjourney to ImageGen, as well as tips for using AI design apps like Adobe Firefly or an image generator from photo to integrate imagery into your own designs.
Tap into the top 2025 AI design trends with these AI tools for graphic design, photography, and advanced image editing, and see your projects come to life!
Best for social media content, trending styles, and the leading models available! | |
Chat GPT (GPT-4o) | Best for photorealism and conversational editing. |
Adobe Firefly | Best for photography and project integration. |
Midjourney | Best for artistic, atmospheric imagery. |
DALL·E 3 | Best for cartoons and nuanced prompts. |
Flux 1.1 Pro Ultra | Best for high-definition portraits. |
Recraft | Best for graphic designs and vector images. |
Stable Diffusion | Best for uninterrupted creativity. |
Reve | Best for fast generation and high detail. |
Ideogram | Best for clear text and commercial imagery. |
First, back to basics—maybe you’ve used an AI image generator before and are curious about what else is out there, or perhaps you’re fresh to the AI app scene. Either way, AI image generators are fast becoming an essential tool in a creative’s kit to visualize ideas and experiment with different styles and layouts. And with the advances in the technology, it's now possible to use AI art generators to create unique work as part of a creative project.
In a nutshell, AI image generators transform your AI art prompts into a visual image. The more refined and specific your text prompt, the more likely it is that the resulting image will be in line with what you imagined.
They're trained on vast amounts of visual data, allowing the generator to build associations between styles, subjects, and patterns. The more advanced image generators will be able to pick up on AI image trends and design trends more widely, creating more relevant and contemporary results. The best AI design apps are capable of generating images that are almost indistinguishable from real-life pictures—although there are a range of tell-tale signs you can use to identify AI-generated images.
And yup... human hands are still a sore point for almost all the image generators we tried. So we'll keep you posted on that one!
It’s important to know that the best AI design apps enable your creativity, rather than replacing it. They take your ideas and turn them into reality, allowing you to refine your AI image results further to achieve particular angles, styles, colors, and trends.
The most advanced AI design tools might allow you to integrate AI images into your own work, creating a seamless design that blends the best of both worlds. So depending on what you’re looking for—whether mapping out a creative idea or looking for something more sophisticated—these are the best AI design apps by project. Scroll down for the full list of our recommendations to discover even more great AI tools for design, and take a deep dive into the features they offer.
The best AI tool for graphic design? If you’re looking to map out design concepts for a brief, a quick and intuitive app like ImageGen is a great starting point for beginners, and it includes an AI prompt enhancement feature that makes your text even more effective.
For creating logos, typography, and icons, online AI app Ideogram allows graphic designers to pull multiple elements together into a cohesive layout for posters, flyers, or banners.
Recraft places an emphasis on AI images that have an editorial, polished feel, making it a great fit for advertising work or branded campaigns.
To make a quick start with creating AI images, and have plenty of fun in the process, you could try a simple image generator tool like Google’s Gemini, which gives experimental (and often downright weird) results with just a few words.
Or take Meta AI for a spin, which has been designed with beginners in mind. In the app, tap Ask Meta AI and type in what you’d like to generate, starting with Imagine. Place yourself into different scenarios (however bizarre) and share the results on social media. Just don’t expect anything too advanced!
Adobe Firefly is one of the best AI tools for advanced image editing, allowing you to create and refine sophisticated prompts, work with the latest generative AI technology, and integrate your imagery into existing photographs. Experiment with different angles, backgrounds, and lighting prompts to get the most from your AI-generated photos. Flexible and natural results: it's a win-win.
It really depends on the type of project you're working on, but there are a growing number of AI design apps that cater to advanced graphic design, product design, photography, and brand work. Midjourney is great for experimenting with artistic styles and subtle effects in your images, while content creators and filmmakers will love the advanced capabilities of AI video generation in Runway.
For more control over creative results, DALL·E 3 generates really impressive and accurate results. The app is built around ChatGPT but is fine-tuned to image generation, making your requests more atmospheric, nuanced, and specific.
For more recommended AI design apps, read on to discover our overview of some of the best AI image generators for graphic design and other creative projects in 2025.
Looking for the best AI for graphic design projects? Or something a little more cheap and cheerful? These are our top picks for 2025, with recommended use and price details.
At a glance:
If you’re looking for the balance of an intuitive, user-friendly interface with the potential to maximize the creative reach of your AI images, ImageGen is well worth a look. It's easy for beginners to dive in thanks to the ability to enhance your prompts using AI, but this image generator also allows you to get really experimental with aesthetic styles and fun trends. So whether you’re looking for cutesy illustrations or photorealistic portraits, your image results are sure to be experimental, bold, and fun.
Envato's AI tools also have the added benefit of image editing via their ImageEdit tools. You can customise your images even further to get the creation for your project.
You can also find a full suite of complementary creative AI tools to pair with ImageGen, so you can generate videos from static images or refine images further with background removal, erasure, and upscaling.
Best for: Achieving trending image styles, social media content creation, enhanced AI prompts.
Price: ImageGen is included as part of an Individual or Team plan at Envato, which also gives you complete access to Envato’s library of creative assets, plus all its AI tools that includes image editing, video generation, music generation, and voice generation. You can even try ImageGen for free with five image generations. (AI tools are not included with Enterprise plans.)
At a glance:
ChatGPT’s image generation capabilities have always been one of the strongest on the market, but with GPT-4o, developed by OpenAI, users can create images that not only look amazing but are also imbued with more meaning and relevance.
Create images with sophisticated typography and meaningful text (no more blurry, nonsensical type bunged into your image for no good reason!), as well as ultra-convincing photorealistic effects. OpenAI dubs it the app for "useful image generation," and we have to agree—the accuracy and precision of prompts, as well as the conversational style of interacting with the app, make refining your image results easy and intuitive. So you can go from icon to game character to creating a whole visual world in very little time.
Best for: Photorealism, sophisticated prompts, conversational refinement.
Price: Free for all users, with a limit of three images per day. Plus ($20 per month) or Pro ($200 per month) users can generate unlimited images.
At a glance:
Adobe’s AI powerhouse app has been created with designers in mind. Create images, video, audio, and vector graphics, collaborate with fellow creatives using Firefly Boards, and generate videos from static images.
Creative studios love Firefly for its advanced image-editing features and seamless user experience, making it feel like a part of your creative team rather than a standalone AI design app.
Best for: Advanced photo editing, cool additional features like Generative Fill, integration of imagery into existing projects.
Price: You can start using Firefly for free, with limited generative credits. Upgrade to Firefly Standard ($9.99 per month) or Firefly Pro ($29.99 per month) for unlimited image generation and features.
At a glance:
Offering an enticing balance of exceptional ease of use and aesthetically pleasing results, Midjourney is beloved by fans for its ability to create dreamlike landscapes and immersive images that look like something straight out of a fantasy movie, with only a few text prompts.
To use it, you’ll need to sign up for an account with Discord, which is a social messaging platform popular with online gamers. After you've done that, you can use the app simply by typing /imagine
in the Discord chat and creating your AI text prompt from there. One advantage of Midjourney is that it offers cool features to adjust your generated image, so you can create different variations, zoom out, or fill parts of the image with contextual imagery.
Best for: Artistic results, atmospheric images, realism.
Price: Start generating 25 images for free. After that, a Basic plan starts from $10 per month (or $8 if paid annually).
At a glance:
As long as you’re not looking for realistic photography (which isn’t its strong point), DALL·E 3, hosted by OpenArt AI, is a good all-round image generator that excels at producing quirky and experimental images. Cartoon and 3D styles can come out really well, but the definition and quality of images can also vary widely.
Improving on its earlier iteration, DALL·E 2, DALL·E 3 is able to better understand complex text descriptions and create more specific images as a result.
A big plus of the generator is its accessibility and price point. Anyone with a ChatGPT account can access DALL·E 3, or you can use it for free through Bing's Image Creator, making it a good-value option.
Best for: Cartoons and comics, nuanced and accurate prompts, atmospheric imagery.
Price: Available through ChatGPT Plus for $20 a month, or use for free via Bing Image Creator.
At a glance:
Promising photorealism to rival real-life photography, Flux 1.1 Pro Ultra by Black Forest Labs is causing quite a stir in creative circles, and for good reason. Image results are highly detailed, with exceptional lighting and accurate text rendering.
The interface is designed with developers in mind rather than designers, so it's not the most user-friendly AI design app. It also struggles with consistency and prompt refinement, so you have to be patient to get the best results.
Best for: Ultra-photorealistic images, human portraits, high-definition 4K images.
Price: Try Flux 1.1. Pro for free as part of a trial, or create more at $0.06 per image.
At a glance:
The best AI tool for graphic design specifically might just be Recraft, which has a user-friendly interface for creating vector art, illustrations, and 3D graphics. Color control features allow you to keep your palette consistent across multiple images, making designs easily transferrable to branding projects or logo designs. You can also save your creations in a range of handy image formats, including SVG, JPG, and PNG.
We particularly love the attention to detail in Recraft, which means you can subtly adjust small elements of a design, such as typography, color, or background, and it’s super easy to integrate a design into a range of mockups, making it a useful AI design app for ideation and client pitch work.
Best for: Graphic design, vector graphics, product mockups.
Price: Try the app for free, or upgrade to a Basic plan for $12 a month (or $10 paid annually).
At a glance:
User-friendly and cost-effective, Stable Diffusion is an open-source AI image generator developed by Stability AI. Unrestricted and uncensored content gives users more freedom and artistic reach than other AI image generators, granting access to a broader library of content.
A vast library of extensions also allows creatives to fine-tune their image results with ease. If you’re looking for an AI design app that feels closest to an actual artistic process, Stable Diffusion is possibly the most creative tool on the market right now.
Best for: Uninterrupted creativity, flexible editing, artistic results.
Price: Free for most users, with larger organizations required to purchase a licence.
At a glance:
Fast, free, and super easy to use, Reve is a new kid on the AI block (having been released in March 2025), but it's fast becoming a favorite amongst creatives looking for an all-in-one AI image generator that won’t break the bank.
One of the cool features of Reve is the range of aesthetic styles you can play with, such as watercolor, fantasy, and photorealistic. With a little experimentation, you can create highly detailed, immersive images in just a few seconds, and it almost always responds to AI text prompts with efficiency and precision. Well worth a look, we think!
Best for: Fast image generation, high-quality and detailed imagery, precise text prompts.
Price: Free for all users.
At a glance:
On the market since 2023, Ideogram is a strong contender for the best AI image generator for graphic design and gaming imagery, and it's particularly notable for its ability to integrate text as part of imagery without distortion or ‘gobbledygook’.
Ideogram uses Magic Prompt, which transforms a basic text prompt into a more complex and specific description, giving you improved art results. We think it’s a great all-round AI design app for graphic designers, artists, and brand designers, letting you create commercial-style imagery that looks polished and professional.
Best for: Clear text on images, branded graphics, commercial imagery.
Price: Start for free, or begin at $7 a month paid annually for more credits and faster generation speeds.
In an increasingly crowded AI app market, it can be tricky to work out which AI image generator is the right choice for you. Hopefully our selection will help you land on the best AI design app for your next creative project. The advantage of having multiple options to choose from is that many AI developers are starting to cater specifically to certain creative tasks and industries.
So, whether you’re a product designer looking to mock up your next range or a graphic designer seeking a quick mood board of ideas for a client, there are now highly effective AI image generators that are tailored to these purposes. Find the AI app to fit your niche, and let your ideas flow. You’ll be creating amazing AI art in no time!
The next step in your AI journey? You’ll need to discover the best AI art prompts to generate jaw-dropping imagery, or why not learn how to create an AI movie poster to test your AI creative skills? And while you’re here, you can dive straight into creating AI photography, illustrations, and artwork in a few clicks with ImageGen.
People worry about Artificial Intelligence (AI) taking away jobs. But while AI may be doing some work previously done by humans, it also creates new and exciting opportunities for careers in AI—including for creative professionals.
According to an estimate from the World Economic Forum, 170 million new jobs will emerge in the AI industry by 2030. Keep reading if you want to learn about jobs in AI and how to get a job in AI.
In this article, you'll learn more about how AI affects creative opportunities. We'll outline some creative AI roles. Then, we'll explain what you need to know to prepare for AI Jobs.
Jump to content in this section:
To break into a creative job in the AI industry, there are a few things you can do to give yourself an edge over other candidates:
The best way to get an AI job is to work with the tools that are revolutionizing the field. Envato's AI tools make this possible. You can generate images using ImageGen, and then modify them using ImageEdit to remove objects, alter backgrounds, or rearrange layouts. VoiceGen makes it possible to create realistic voiceovers, which is helpful in trying out ideas in content and advertising.
These are hands-on tools, flexible and intuitive. They're especially worth it if you're figuring out how to get a job in AI without a degree. You'll build real-world skills and a portfolio showing what you can do. Whether you're studying AI marketing tools or preparing for AI careers, Envato gives you space to create, learn, and grow with confidence.
@learnwithseb 📚 7 FREE AI Resources (No Tech Skills Needed) You don’t need to code. You just need the right tools. I found the 7 best free resources to learn AI *without* a computer science degree. No fluff. Just stuff you can use right now. Comment “AI” if you want the links (I can’t add them to my bio yet 🙃) Save this before it disappears. Links to all resources here: https://learnwithseb.systeme.io/ (Click the top link - no sign up required) #LearnAI #NoCodeAI #AIforBeginners #ChatGPTTips #AIResources #PromptEngineering #OpenAI #AIEducation #TechForEveryone #FutureOfWork #MakeAI #N8n #ClaudeAI #GoogleAI ♬ original sound - learnwithseb
As you may have noticed, AI jobs for creatives require a unique blend of the artistic and the technical. And since AI is changing and growing fast, you've got to make an effort to stay on top of industry trends and developments. Both free and paid courses are plentiful, so no matter what your budget is, you can pick up the necessary skills.
Invest in continuous growth in your creative field. Use AI tools so you’re familiar with them. And if you've got the interest and aptitude, try to learn one or more AI programming languages. The top ones are:
Although learning programming isn't always a requirement of creative AI jobs, it's something that can give you an advantage over other creative professionals. It'll also open up more opportunities for you.
As a creative professional, you know the drill: You need a stellar portfolio to show off what you’re capable of doing. But to break into an AI job, your portfolio must integrate AI-related projects to show both your creativity and technical skills.
You don’t have to be a computer engineer or programmer to keep abreast of AI developments. You can follow any of the tech-oriented websites, podcasts, newsletters, and social media accounts that discuss AI in layperson’s terms. Some podcasts are even dedicated to AI topics for the general audience. Books on AI are also a good reference. If you want to learn how to get a job in AI without a degree, especially in a creative or marketing field, learning tools such as AI marketing tools can give you a practical edge and insight into how the industry is evolving.
Networking has always been one of the key elements of finding your ideal job, and it remains true for getting a job in AI. Attend in-person or virtual meetups focused on AI discussions for non-technical people.
Not only will you increase your knowledge and understanding of AI trends, but you’ll also meet AI professionals who tell you what it’s like to work in the AI industry. They may even have job leads for you.
@deepa_toks Makes it so much easier to have more consistent and meaningful connections with people in your network :) #careertiktok #networking #networkingadvice #careeradvice #networkingtips #AI #AItools #networking #careerdevelopment #jobhunt ♬ original sound - Deepa
Because the AI field is always changing and evolving rapidly, you've got to commit to always be learning. Fortunately, there are many opportunities for learning. Many colleges and universities are offering AI-related courses.
If you prefer to learn virtually, you can do so through:
Even if you've got little—or no—budget for learning, you can find lots of ways to develop and enhance your skills in AI.
Contrary to popular belief, the AI industry doesn’t only offer opportunities for engineers and computer techies. It opens up an array of opportunities for creatives.
“AI won't replace creative jobs just as the invention of the camera didn't make paintings obsolete,” says Ashley Still, senior vice president of digital media at Adobe.
And while digital cameras have enabled more people to take their own photos, professional photographers continue to be in high demand.
That’s because AI, even generative AI, can't create anything from scratch. It augments human intelligence rather than replacing it. With that in mind, here’s a list of creative AI jobs, also known as “AI creatives”:
An AI artist creates AI-generated art. This job requires expertise in creative design as well as computer vision and machine learning. The goal is to create visually stunning artwork and photos generated by AI.
As an AI artist, you’ll be involved in every stage of the creative process:
The key is to create art that would be hard or impossible for humans to make. To succeed as an AI artist, you must be passionate about pushing the boundaries in AI-generated art.
An AI content writer or trainer helps train Generative AI by writing novel conversations. These will be used to train GenAI on how to respond to queries and prompts. You’ll have conversations with GenAI, fact-check its responses, and track its progress.
You’ll need to have strong skills in writing dialogue and conversational text for this AI job. Creatives with experience in screenplay writing would have an edge.
Read: 10 Best AI copywriting tools for business
An AI copywriter or AI editor creates informative content about AI. This may be for various platforms such as:
The job of an AI copywriter or editor usually encompasses keyword research, SEO writing, and market research. That is, you should know how to write engaging articles about AI that will rank highly in search engines.
Aside from good writing skills, you will also require experience in AI technologies as well as passion for its development and application in industries. Familiarity with AI marketing tools can prove to be an extra advantage, especially if you're exploring how to get a job in AI without a degree.
Not to be confused with techies who design user interfaces for AI, an AI designer is someone who creates designs using AI’s machine learning algorithms. It’s an exciting new field for graphic designers.
This job requires strong graphic design skills. At the same time, you must know how to use GenAI and how to use it in design projects.
Learn more: AI graphic design tools and techniques—how to harness AI for design
An AI film editor and director uses AI to create videos and films. With the help of AI, you’ll analyze audience preferences to optimize your films and videos for specific audiences, markets, and demographics.
You may also use AI for everything, including:
Aside from knowing the basics of film production, editing, and directing, you must know the latest AI technologies in film and video.
@envato Join @danatoday ♬ original sound - Envato
The AI game developer role is a combination of creativity and programming know-how. The goal of this job is to create exciting games using AI.
Your role may be more on the creative side of things (designing game worlds and characters), or it may be more technical (writing algorithms and programming the game to bring the designers’ vision to life). Either way, you’ll need to know how to apply AI techniques in all phases of game development to optimize the gameplay experience for users.
Like the AI artist, an AI musician creates music using AI. With AI streamlining your workflow, you’re expected to produce music for specific genres and themes, which would be almost impossible for humans to create.
The ability to play one or more musical instruments or sing would be an asset, along with knowledge of AI technologies. You’ll also need to be creative and give appropriate prompts to GenAI to produce unique and enthralling pieces of music.
Careers in artificial intelligence exist for reporters, too. The AI reporter job is specifically for those with a background in journalism. An AI journalist is someone who reports on the AI beat for media companies.
Your role includes generating story ideas on the beat, reporting on the news of the day, and investigating deeper stories.
Knowledge of SEO writing and keyword research is an asset, especially if the role is specifically for digital platforms and social media. You must be passionate about all things related to AI. It also helps to have connections in the AI industry and have enough technical knowledge to understand the lingo and be able to translate it to a lay audience.
If you love teaching and you’re passionate about AI, then this job may be the perfect one for you. As the name implies, an AI teacher delivers classes about AI and how to use AI tools.
Many of these classes are delivered online. However, educational institutions are also hiring AI teachers for in-person, face-to-face classes.
This role covers lesson planning, developing curricula, designing training programs, and delivering classes. To succeed in this job, you need to stay on top of developments and trends in the AI industry. Classes on subjects like AI marketing tools are also in high demand. This is also a great path for those who are thinking about how to get a job in AI without a degree, especially if you enjoy breaking down complex ideas in a simplified way.
AI writers produce written content with the use of AI tools for writing. You could write blog posts, articles, website copy, marketing materials, and everything in between. You’ll need to be a good writer, of course. At the same time, you should know how to write effective prompts for GenAI to deliver the tone, style, and content you’re looking for. Research skills and SEO copywriting are important skills to have for this job as well.
This is just a snapshot of emerging AI jobs for creative professionals. The AI job landscape is dynamic and exciting. Increasing applications of artificial intelligence will create new jobs, many of which we can't even imagine. And opportunities aren’t only for programmers, user interface designers, and data scientists. There will continue to be a demand for creative professionals who want to be at the intersection of innovation, storytelling, and imagination.
Speaking of learning more about AI through online resources, did you know that we've got many posts about AI? Here are a few to get started with:
There’s plenty more, so feel free to explore the site for other AI-related articles and tutorials.
AI is an exciting industry to work in, and you’ll want to have every advantage possible over other job candidates. Envato has everything you need to create outstanding job applications that'll get the attention of recruiters.
Regardless of whether you're building a portfolio, crafting a resume, or writing a cover letter, Envato has everything you require in one place. Utilize professionally designed templates and enhance them with high-quality icons, fonts, images, videos, and audio effects. All of that is included in one convenient subscription with one license that covers personal and commercial use. You can use these assets for your creative work, including your AI projects, without limitation.
As AI pervades every area of our lives, more and more careers in AI are created. And jobs in AI aren't just for computer programmers, engineers, and data scientists. There are also plenty of roles for creative professionals. AI careers for creatives include using AI tools for creative work such as writing, art, and music. Platforms and companies dedicated to producing content about AI also require the skills of writers, artists, graphic designers, and other creative professionals. Beyond all this, creative skills are needed to train AI and make AI more effective.
By now, you've got a better idea of how to get a job in AI. You know some of the things you can do to stand out as an ideal candidate for an AI job. Develop the skills you need, including some programming languages, to get an advantage. Stay updated on AI developments. And build a network of contacts in the AI industry.
Another important part of your job-finding toolbox is an impressive portfolio that showcases both your creativity and technical know-how. With the help of the templates and creative assets in Envato, you can produce an AI-focused portfolio, cover letter, resume, and other application documents. These will help you stand out from other applicants, make a good first impression, and wow recruiters.
Which of the AI art generators is better: Midjourney or Stable Diffusion? Both these AI art generators are amazing at transforming text prompts into eye-catching art. However, to help you choose the best tool for your artistic needs, we need to analyze factors like pricing models, image sizes, customization, and more.
In this article, we will round up the key features of Stable Diffusion vs. MidJourney and weigh the strengths and weaknesses of these powerful AI image generation models.
Jump to content in this section:
Midjourney is an AI art generator founded in San Francisco, California, by David Holz. It entered into open beta in July 2022. Midjourney is a text-to-image AI image generator known for adapting basic art styles and generating remarkably vivid images.
Midjourney is a machine-learning model that allows users to generate images based on text prompts.
Wondering how to use Midjourney? Currently, Midjourney is only accessible through the Discord chat app. To get started with it, you will need to create a Discord account. Once you've done that, head over to Midjourney's landing page and Sign In with your Discord account.
To start generating images, you need to Purchase a subscription plan. After that, click on Community to connect to the Midjourney server.
Midjourney has its own Discord server, so once you join the Midjourney Community, you will need to accept the Discord invitation by pressing the Accept Invite tab, to access and connect to the Midjourney server. When you've gained access to the server, you can enter one of the 'newbies' channels to start creating images.
Type in the /imagine
command to get started, and enter a text prompt to generate the image you want.
If you'd like to know a little more about the process, you can check out this new article on Envato Tuts+:
Stable Diffusion is an AI image generator model that was developed and released by Stability AI on 22 August 2022. This tool was built to convert textual prompts into visual outputs, using algorithms based on machine learning, state-of-the-art deep learning, computer vision, and natural language descriptions.
Stable Diffusion can produce a multitude of artistic styles, ranging from anime to photorealistic art, in a matter of seconds.
If you're wondering how to access Stable Diffusion, you should know that Stable Diffusion is entirely open-source and free for commercial and non-commercial use. The software allows everyone to access it, modify it, and use it.
There are several ways users can gain access to Stable Diffusion. One is by installing the mobile app Dreamer. Another method is through the web app Stable Diffusion Web, and there are several other ways, both online or offline, by installing the software to a hard drive.
To find out more ways to use Stable Diffusion, check out this article:
Is Midjourney free? Midjourney has moved from offering free trials to being a tiered paid service. A Midjourney subscription offers a limited number of hours for free image generation each month. For example, a Basic Plan subscription is billed annually at $96 ($8/month) and allows 3.3 hours/month. A Mega Plan annual subscription cost is set at $1,152 ($96/month) and offers 60hours/month.
Here's a look at the current Midjourney prices and subscription plans available for Basic, Standard, Pro, and Mega:
Stable Diffusion is currently free and also offers a paid credit plan for its software, starting at $29. Users can access its free basic features without needing licensing or subscription fees. The free version of Stable Diffusion allows users to perform limited edits and experiment with art styles. On the other hand, if you are looking for advanced image editing or processing, you will need to subscribe to a Premium Plan.
Stable Diffusion offers three pricing plans: Basic, Standard, and Premium. They are different in features, speed, cost, and capabilities.
Midjourney and Stable Diffusion are both powerful AI image generators. Let's take a look at the key features and benefits of Stable Diffusion vs. Midjourney by comparing image quality, accessibility, ownership, and customization options.
Both Midjourney and Stable Diffusion allow you ownership of the images you create, with no branding or watermark. However, with Midjourney, it depends on which paid tier you have, as you have more rights with higher tiers.
Stable Diffusion, on the other hand, claims no rights to the images generated and allows users to distribute and sell their AI images. For further information, read their license and terms.
Stable Diffusion has more flexibility and customization when it comes to art styles, image size, negative prompts, adjusting the prompt parameters, and the number of images generated.
Both AI art generators have their strengths and weaknesses. Let's take a quick look at the pros and cons and how to use Midjourney and Stable Diffusion.
When choosing which AI generator is the best for your work, it comes down to your individual preferences and needs. You should consider factors like what type of images you want to create, how much control you want to have over customization, your budget, and your comfort level in using the technology.
For beginners: Midjourney shines with the Discord interface and minimal customization, making it a gentle dip into the AI art pool. Stable Diffusion, while offering deeper control, demands steeper technical learning to obtain finer results.
Cost considerations: Midjourney starts with a paid subscription, while Stable Diffusion boasts a free downloadable version. However, the premium features on both platforms come with additional costs.
Copyright quandaries: Both platforms have evolving copyright guidelines. Midjourney retains commercial rights, while Stable Diffusion allows personal and non-commercial use with proper attribution.
Exploring the depths: Midjourney excels at generating unique, dreamlike compositions, while Stable Diffusion offers precise control over existing images with tools like inpainting and outpainting.
The ultimate test: Consider your needs. Do you value ease and quick bursts of inspiration? Midjourney might be your muse. Do you crave meticulous control and endless tinkering? Stable Diffusion awaits your sculpting touch.
Ultimately, the best AI tool is the one that sparks your creative fire. So dive in, experiment with both, and let your digital dreams take flight!
Would you like to learn more about Midjourney, Stable Diffusion, and alternative AI image generators? Check out these articles from Envato Tuts+:
AI generated images seem to be the thing on everyone’s lips at the moment, whether that’s discussing if AI generated visuals can really be ‘photography,’ or how realistic they are. What isn’t in doubt, is how powerful AI stock photos can be when it comes to specific purposes like graphic design, marketing, content creation, and of course, stock photography. In this article, we look at the 10 best AI photo generators to make stock images fast in 2024.
Midjourney has definitely been one of the most talked about AI picture generators. Currently in open beta, users type in a prompt that returns a set of four images. Each of those can then either be upscaled or used as a base to create further, similar images.
Pricing
The pricing here based on paying for a year (with a 20% discount)
Tier |
Cost and What you get |
Free |
No longer exists unfortunately, aside from the occasional promotion. |
Basic |
$96 – 3.3 hours per month, 3 jobs at once, 10 jobs waiting in the queue. |
Standard |
$288 – as above but with 15 hours per month and unlimited relax GPU time. |
Pro |
$576 – as above but with 30 hours per month, 12 fast jobs, and 3 relaxed jobs, and the addition of ‘stealth’ mode. |
Mega |
$1152 – as above but with 60 hours per month. |
Pros and Cons
Pros |
It’s very good and getting better with every release, the results are high quality and realistic. |
Cons |
Currently only available through Discord, no longer any free use. |
Adobe Express AI Image Generator is a powerful tool designed for creating stock-quality images with ease. Part of the Adobe family, this generator is seamlessly integrated into Adobe Express, making it ideal for professionals and beginners alike.
Pricing
Adobe Express AI Image Generator is available as part of Adobe Express plans, starting at $9.99 per month.
Tier |
Cost and What you get |
Free |
Limited access to basic tools, perfect for experimenting with the platform. |
Premium |
$9.99/month – Includes full access to the AI Image Generator, unlimited downloads, and advanced customization options. |
Pros and Cons
Pros |
Easy to use, even for beginners. Integration with the Adobe Creative Suite for enhanced functionality. Fast and reliable, with professional-quality results. |
Cons |
Advanced features are only available with a subscription. Limited free tier access. |
NVIDIA Canvas doesn’t use text prompts. Instead, you paint rough shapes and lines onto a canvas, and the AI generator will fill the screen with realistic interpretations. You can swap out different elements and customise your image with a variety of styles and options available.
Pricing
Tier |
Cost and What you get |
Free |
It’s free! You get everything, but you do need certain things to run it (see ‘cons’). |
Pros and Cons
Pros |
It’s free and the results look great, you can use pre-designed elements and some very rudimentary artistic skills to get a pretty decent landscape. |
Cons |
It requires RTX Tensor Cores to function and is supported on GeForce RTX and NVIDIA RTX GPU, it’s not designed to create photographs of people, so its uses are limited. |
RunwayML is a platform that provides a range of AI models, including AI generated images. It generates high-quality images via text prompts that you can then customise and ‘generate’ from 1 image up to a batch of 500, making it a powerful tool for creating stock images.
Pricing
Tier |
Cost and What you get |
Basic |
Free forever, though that’s a slight misnomer given you can’t buy any more credits once your 125 freebies are gone. It also includes watermarks on your images and you can’t upscale. |
Standard |
$12 / month. More of everything, basically. You can buy credits, remove watermarks, and have up to 5 users, plus there are extra export options. |
Pro |
$28 / month. As above, but with full access to everything and up to 10 users. |
Enterprise |
Contact for a quote. Lots of ‘custom’ options which aren’t listed on the site. |
Pros and Cons
Pros |
Versatile – you get more than just an AI image generator. High quality, realistic images. Easy to use. |
Cons |
The free tier is limited and then it gets quite pricey. Although realistic in style, the photos themselves have been described as ‘surreal’ which may make them unsuitable for many stock image requirements. |
Artbreeder is an AI picture generator that lets you blend and evolve existing images into new artworks.
Pricing
You can save 20% on the cost if you are billed yearly.
Tier |
Cost and What you get |
Free |
10 credits per month – no extras. |
Starter |
$8.99 – 100 credits per month and syncs with Google Drive and gives you privacy controls plus custom genes. |
Advanced |
$18.99/month – as above with 275 credits per month. |
Champion |
$38.99/month – as above but with 700 credits per month. |
Pros and Cons
Pros |
A fairly unique way of creating stock images. Wide range of styles to experiment with. |
Cons |
No privacy controls on the free tier – eek! Results are… unpredictable. |
Now in its second full release, Dall-E 2 creates images from a written prompt. Dall-E boasts that its images are original and realistic.
Pricing
The pricing for Dall-E AI picture generator is complicated. Here’s their summary:
“Multiple models, each with different capabilities and price points. Prices are per 1,000 tokens. You can think of tokens as pieces of words, where 1,000 tokens is about 750 words. This paragraph is 35 tokens.”
Pros and Cons
Pros |
Unique images. Good for stock images that need unusual prompts or unconventional ideas. |
Cons |
Complicated pricing. You need to get good at prompt writing to have usable results. |
DreamStudio boasts ‘effortless image generation for creators with big dreams’. As well as creating images from written prompts, you can expand, add and remove items from them too.
Pricing
DreamStudio works on a credit only system.
Tier |
Cost and What you get |
Free |
You get 25 credits for creating an account, which is 30 images at the default setting and 50 images with the API’s default setting. |
Credits |
A minimum purchase of 1000 credits for $10 is required. |
Pros and Cons
Pros |
Credits don’t expire. Style choices are wide and include photo-realistic images. |
Cons |
It’s still in development so there might be some teething issues using it. |
AI is revolutionizing the way developers write code. Learn how to write code with ChatGPT in this step-by-step tutorial.
Dream is a pretty simple prompt-based AI image generator, so a good start for beginners. You can make one image at a time using some references images to indicate preferred style – these are limited unless you pay.
Pricing
Tier |
Cost and What you get |
Free |
Get started for free with limited options. Good for practising prompts. |
Premium (subscription) |
$9.99/m or $89.99 per year. Full access. |
Lifetime (one off payment) |
$169.99. Full access. |
Pros and Cons
Pros |
You can play around for free to get used to it. A lifetime license is unusual – could be great if the software improves. |
Cons |
The results aren’t brilliant and they take a little while to generate. Free users are limited in which styles they can create. |
This AI photo generator works in a number of styles, including photo-realistic images. You need to create an account to even try Deep Dream, but you can see some examples on their home page.
Pricing
Deep Dream call their pricing, ‘energy...’ credits, essentially. You can save 25% with yearly billing. You can also purchase ‘energy packs’ as needed.
Tier |
Cost and What you get |
Advanced |
$19/m - 120 energy, 12 recharging an hour, 20 GB storage, Full HD |
Professional |
$39/m – 250 energy, 18 recharging an hour, 50 GB storage, Quad HD+ |
Ultra |
$99/m – 750 energy, 60 recharging an hour, 200 GB storage, Quad HD+ |
Pros and Cons
Pros |
The AI generated images in art styles aren’t bad. |
Cons |
The pointless jargon of energy and recharging is enough to put you off. The pricing tiers are steep considering it doesn’t offer much more than similar competitors. It’s photograph style needs improvement. |
Generated Images lets you browse existing images or generate your own AI stock image. This site focuses on people, and you can start with a random face or build your own from scratch.
Pricing
Tier |
Cost and What you get |
Free |
A 3-day trial |
Monthly |
$19.99 – unlimited generations, 15 hi-res downloads per month, 1024px x 1024px JPEG or PNG. |
Yearly |
$199 ($16.58/m) – as above |
Pros and Cons
Pros |
Simple pricing structure. If you have the patience you can build something very realistic. Wide range of existing AI generated images. |
Cons |
It’s mostly focused on people/models. Very limited trial period. Specific licensing terms for certain things, so you need to read them carefully before you use. |
Canva is already a one-stop-shop for many people when it comes to creating social media posts, marketing images and much more… and now, it has AI generated images too! Canva’s AI integrates with its other tools, so you can create AI images from pre-sized templates.
Pricing
Tier |
Cost and What you get |
Free |
Right now it’s totally free, though they limited their writing AI eventually, unless you subscribed. I wouldn’t be surprised if that happened here too. |
Pros and Cons
Pros |
It’s free. You don’t need much in the way of skill to use it. Intuitive interface. |
Cons |
The results are fairly poor if you’re looking for photo-realism. |
There are a lot of very similar offerings when it comes to AI Generated Images, so it makes choosing the best AI image generator a bit tricky.
If realistic results are important to you then it’s probably going to come with a price tag. Midjourney and DALL-E are renowned for getting realistic images with text prompts, so they’re a good place to start.
For art and landscapes most AI image generators aren’t doing too badly. People are more difficult, so try Generated Photos.
Cost gets complicated. It’s wise to try something with a free trial so that you can see if you like it first. I won’t tell you that Dream by Wombo has incredible results, but if you’re new to AI picture generating then it’s good practice for prompt writing and seeing what results you get, particularly now that Midjourney doesn’t have a free option. DreamStudio has some free credits too and then offers a PAYG system which you might find more appealing than subscription.
If you already use Canva, then Canva AI is a no-brainer, like Dream by Wombo it’s a good place to practice prompts and get familiar with styles.
If prompt writing isn’t your thing and you’ve an artistic flair, it might be worth trying the drawing based AI generators, like NVIDIA Canvas, where you can add and remove elements by sketching in simple shapes.
AI picture generators are becoming very, very good and already we can see several powerful tools coming to the forefront, like Midjourney and DALL-E.
They offer a wide variety of artistic styles, and many of them are getting the hang of photo-realism too. There are still limitations, though.
Price is a huge factor – right now, subscribing to a decent AI photo generator will cost you quite a lot per month, which means if you’re looking for volume, it’s probably not there for you yet.
If however, you’re looking for something to use now and again for specific projects, particularly ones that require something more artistic or unusual, then you may find them a good place to go for stock photo creation.
Remember to review licensing terms carefully so that you don’t fall foul of any copyright laws or usage rights.
We should remember that AI photo generators are incredible assets that are designed to complement our creativity, rather than replace it.
If AI picture generators isn’t quite where you want to be yet, don’t worry, we haven’t abandoned traditional stock photography. You can find non AI generated images – or stock photographs(!) as we like to call them. at Envato, and the best bit is you can download as many as you like with your subscription.
This page was written by Marie Gardiner. Marie is a writer, author, and photographer. It was edited by Gonzalo Angulo. Gonzalo is an editor, writer and illustrator.
Added January 11, 2012 at 1:27am
Added January 11, 2012 at 1:23am
Added January 11, 2012 at 1:21am
Added January 11, 2012 at 1:17am
Added January 11, 2012 at 1:17am
Switch to the Mobile Optimized View
© 2009-2025 PORTFOLIOS*NET by CreativeMOVE.
Powered by
Comment Wall (71 comments)
You need to be a member of PORTFOLIOS*NET to add comments!
Join PORTFOLIOS*NET
ไม่ทราบว่ารับ ตำแแหน่ง Motion ไปหรือยังครับ
สวัสดีครับยินดีที่ได้รู้จักครับ ผมโน๊ต ฝากติชมด้วยนะครับ
ปล. ชอบ stefan sagmeister เหมือนกันครับ
View All Comments