LogoLogo
v2.2.0
v2.2.0
  • 🌸What is Petal Pro?
  • πŸ’‘Changelog
  • ⏫Upgrade guide
  • Guides
    • πŸš€Creating a web app from start to finish
    • 🌎Deploy to Fly.io
    • πŸ’³Adding a subscription
    • πŸ”’Creating Your Own API
    • πŸ”ŒContent Editor - adding your own plug-in
  • πŸ‘©β€πŸ³Recipes
    • πŸ’How to apply a recipe with git cherry pick
    • #️⃣UUIDs
    • ✍️First/Last name
    • πŸ—ΊοΈGoogle Maps
    • Password Hashing for Windows
  • Fundamentals
    • πŸ’ΏInstallation
    • πŸ“‚Folder structure
    • πŸ—ƒοΈIncluded Pages
    • πŸ˜€Users & Authentication
    • 🏒Organizations & Multitenancy
    • πŸ’³Stripe billing
    • Blog/CMS
    • πŸ””User Notifications
    • 🧊Components
    • ⬛Dark mode
    • 🎨Branding
    • 🌱Seeding
    • πŸ“„Layouts & Menus
    • πŸ–ΌοΈImage uploads
    • πŸ‘₯Impersonation
    • πŸ› οΈBackground Tasks and Jobs
    • πŸ”§Util & Helpers
    • πŸ“§Emails
    • πŸͺJavascript Hooks
    • πŸ“šExtra Hex Libraries
    • πŸ—οΈGenerators
    • πŸ—£οΈTranslations
    • πŸ–οΈContributing
    • πŸ›«Deployment
    • πŸ›‘οΈTesting
    • πŸ”’REST API
Powered by GitBook
On this page
  • Logos
  • Colors

Was this helpful?

  1. Fundamentals

Branding

Logos

If you open core_components.ex you will find some functional components for your logo. You can use them in your templates like so:

<.logo /> <!-- Will adapt to the user's color scheme (light/dark) -->
<.logo variant="light" />
<.logo variant="dark" />
<.logo class="h-20" />

<.logo_icon /> <!-- Display the icon part of your logo  -->
<.logo_icon variant="light" />
<.logo_icon variant="dark" />
<.logo_icon class="h-20" />

For this to work with your own logo, you will need to replace the Petal logos:

  • /priv/static/images/logo_dark.svg

  • /priv/static/images/logo_light.svg

  • /priv/static/images/logo_icon_dark.svg

  • /priv/static/images/logo_icon_light.svg

  • /priv/static/images/favicon.png

  • /priv/static/images/open-graph.png

Using Figma to create your assets quickly

It's very easy to just replace the icon and text with your own brand, and then it will export all 6 files for you to place straight into your /priv/static/images folder.

Colors

Petal Pro and Petal Components expects you to define a primary and secondary color. These typically represent your brand.

In the file /assets/tailwind.config.js you will see the primary and secondary colors defined:

const colors = require("tailwindcss/colors");

module.exports = {
  content: [
    "../lib/*_web/**/*.*ex",
    "./js/**/*.js",
    "../deps/petal_components/**/*.*ex",
  ],
  darkMode: "class",
  theme: {
    extend: {
      colors: {
        primary: colors.blue,
        secondary: colors.pink,
      },
    },
  },
  plugins: [require("@tailwindcss/forms"), require("@tailwindcss/typography")],
};

PreviousDark modeNextSeeding

Was this helpful?

We created a to easily create and import these assets.

There are more detailed instructions inside the for you.

By default the primary color is blue, and the secondary is pink. You can check out a list of Tailwind color options . If you want a custom color, you can check out .

🎨
Figma file
Figma file
here
tailwind.ink
Use Figma to quickly export your assets
Easily export all your assets in one go