Elements 0.6.8 (23389)

Hello again,

This is a hot-fix to resolve crashing issues in projects using custom colours.

Whats New in Elements 0.6.8?

  • Fixed crashes caused by custom colours
  • Fixed issue where text would revert to lorum ipsum

Purchase a License

You can visit the elementsapp.io website to purchase a license.

Get the Update

Elements should prompt you while it’s running to let you know there’s an update. If it doesn’t, you can select the “Check for Updates…” menu option from the “Elements” app menu.

Alternatively, you can always download the latest build of Elements here.

Give Feedback

If you are running a licensed copy of Elements, please post all feedback in the Feedback Forum. You can use the Elements > Send Feedback… menu item to automatically pre-fill the build number into a new topic.

It just stated this …

Try again, 0.6.8 is now available for realz this time :rofl:

Ok let me say first something positive before I start reporting findings again …
I love love love the 950 support :heart:

Ok now lets see:

I think there is something off in the color calculcation.
Starting from white at 50 generates the same colors at 100-900 like when starting from 950 with black. But why is then 50 not white and the other way arround 950 is not black on the white palette.

Re: Elements transcribing PHP code?

I know you guys have got a lot on your plate at the moment but just wanted to flag up that this PHP issue is a ‘show stopper’ as it is “transcribing” the PHP code and making the webpage completely non-functional.

I realise it wasn’t identified as being fixed in 0.6.8. :slight_smile:

Sorting changed on Spacing.. sorted by name not by REM like before.
So it is actually a text sort.

Maybe a custom order would be nice. :melting_face:

We generate 13 colours and drop the first and last, otherwise we get a black and white on every gradient. I wouldn’t get too hung up on it; it’s just there as a means to generate gradients quickly. We’ll probably refine it further in the future.

Here’s the code we currently use… and yes, we’re open to improvements :blush:

import chroma from "chroma-js"

rw.color = function(colorJS) {

    const brightness = colorJS.brightness
    const actualColor = chroma(colorJS.color)

    const lightColor = chroma(colorJS.color)
        .luminance(1.0)

    const darkColor = chroma(colorJS.color)
        .luminance(0.0)

    var colors = chroma
        .scale([lightColor, actualColor, darkColor])
        .domain([0, brightness / 10, 1.0])
        .mode('lab')
        .colors(13)

    // Add 1 because we generate 13 colors and strip the first/last
    colors[brightness + 1] = colorJS.color

    // Return the middle 11 colors
    colorJS.colors = colors.splice(1,11)
}

It’s now done by the order it is in the JSON file… I just ran out of time to organise it correctly.

If you’re editing a theme in a DevPack, you can re-order the theme settings with lists, like “Font Family”, “Font Shadow”, “Shadows”, and “Typography”, like this…

CleanShot 2025-03-21 at 12 .43.27

1 Like

Yeah the running out of time .. oh well .. I just wanted to let you know.

Ok now I got how you do the calculation. Based on a few readings and also on some testing I started to build the color like this.

I check the max / min value of the luminance of the current color against 95 / 5.

So the 5 and the 95 garanties I will not end up with a plain white and black. Unless that base color has already a Luminance below 5 are above 95.

Also for the hex to hsl you can use this:

function hexToHsl(hex) {
  let r = parseInt(hex.substring(1, 3), 16) / 255;
  let g = parseInt(hex.substring(3, 5), 16) / 255;
  let b = parseInt(hex.substring(5, 7), 16) / 255;

  let max = Math.max(r, g, b),
    min = Math.min(r, g, b);
  let h,
    s,
    l = (max + min) / 2;

  if (max === min) {
    h = s = 0;
  } else {
    let d = max - min;
    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
    switch (max) {
      case r:
        h = (g - b) / d + (g < b ? 6 : 0);
        break;
      case g:
        h = (b - r) / d + 2;
        break;
      case b:
        h = (r - g) / d + 4;
        break;
    }
    h = Math.round(h * 60);
  }
  return [h, s * 100, l * 100];
1 Like

Will be sorted in the next-ish build :laughing:

ok I figured out the elements part:

Lets compare that with a few other options. You can pause the video and compare the colors :wink:

Ok now if you look at weighted colors. It is adding / removing the saturation as I send you in the email. With red you won’t drift off into an orange.

I still have major problems when I dragging a SVG file in from the resources area. I first noticed this with the “AI Marketing” tutorial." I don’t know when you added SVG support but dragging in files for me doesn’t work like it does so easily on your computer from the video tutorial.

Sometimes when I drag the SVG in I’ll even get text. Before I make screen shots or a video I was curious if anyone else was getting this problem? I’m not sure if I heard anyone else mention it.

@KipV

try my svgs see if they drop in ok

elementsapp://downloadDocument/kJIbe1EkTKT9

1 Like

@dan thanks for these fixes things are working a lot better now.

But I have run into numerous problems with Typography and Text Size.

CUSTOM TEXT SIZE: I have a custom text size called “lead” which is used to style a lead paragraph. Before this the last two releases this worked great. But now my text that had “lead” applied it goes to a much smaller size than I had defined (1.40 rem). I typically only use this on Text components, but it will not work when I set the size in the General settings. The only way to get it to be applied is if I select all of the text and set the size inline. I should not have to do it this way.

TYPOGRAPHY: I have my own fonts setup for body, heading, quote, and code. I also have a custom typography setup that uses these for the various parts of the typography. But unfortunately they are not being applied. Any text that is using my custom typography settings is not being displayed with those settings. This has never been a problem in the past so I’m wondering what is going on. I have tried recreating my overrides but it does not seem to ,ake any difference. I can set the style if I select all of the text and do it inline, but this does not give me all of the line height and other details that I setup in my typography (I dislike typing this word) settings.

Any insights would be appreciated.

Yes your SVGs work fine. I wonder if it has something to do with the way my where constructed? If I remember right I either saved them off of the sample site or had to take screenshots of them and try exporting them as SVG once I cut out the background.

I might not have obtained the images in the best way possible which could be causing the problem? In a real job I would have exported the SVGs right out of the vector program. So I wonder if this is more an image creation problem and not an Elements problem?

I have seen this problem as well and tracked it down to a badly formed SVG file. In my case due to over zealous editing of the code to reduce the size. It appears if the SVG is malformed Elements displays a text icon, which was the tip-off for me.

Now I create all of my SVG files in Affinity Designer, export them and then run them through the web tool OSVG, which allows you to really optimize them.