how can i auto-generate sets of 3 colors (border, fill & text) that go together - color-scheme

I am trying to automatically generate a bunch of images all
containing a border, a fill and a text label within.
I am using a script to generate a svg file that I subsequently rasterize using batik
I'm looking for either
an algorithm to generate distinct color sets that go together
or a pre-canned set of colors that someone has put together
Pointers appreciated

I have used this online colour scheme generator for "quick fixes".
http://www.colorschemer.com/online.html

I came across sassafras that provides a good building block
https://github.com/teejayvanslyke/sassafras
and it references
http://www.tigercolor.com/color-lab/color-theory/color-theory-intro.htm
to help with color theory

Related

Looking for guidance on how to add custom class to sections and modules in Squarespace?

I have a client who is using Squarespace and asked that I fix a mobile stacking issue.
I have 2 rows that have image + text alternating side by side. This looks fine on desktop, but the on mobile the stacking order is wrong.
Desktop Stacking:
Image + Text
Text + Image
Current Mobile Stacking:
ImageĀ 
Text
Text
Image
Ideal Stacking:
Image
Text
Image
Text
Typically I was accomplish this by alternating the sections with a custom class, but I'm not seeing any place to add this. Are you able to add custom classes to sections?
Any help is appreciated. Thanks!
It is not possible to directly edit the markup that appears within Squarepace's default grid and block system (they call it, "LayoutEngine"). Generally speaking, one must either write their own HTML within a Code Block (or via Code Injection points), or use JavaScript to alter the HTML after the default markup is loaded onto the page.
But in your case specifically, this is a common problem in Squarespace, and it is usually solved with just CSS, using a combination of:
first-child, last-child and nth-child selectors, and/or
the > direct-descendant/child-combinator, and/or
specific block IDs (each sqs-block has a unique id attribute), and/or
a media query so that the rules only take affect after your mobile breakpoint is reached, and/or
either display:flex with the order property. or display:table-header with display:table-footer in order to force a different stacking order.
The specific CSS often varies greatly based on the specific circumstance, whether you're trying to reorder blocks, columns, or rows. The similar question linked to above provides a specific solution to the same problem you are trying to solve, but the code that solves it in your case may look quite different, though it will likely use a combination of the five things mentioned above.
Or, you can use JavaScript to target the blocks and add your own classes, then write the CSS with those classes. Even in that case, the general approach is the same.

Building multiple arrays from a read textfile

I am trying to build multiple arrays from a read textfile. The read text file comes out as a long column of numbers, and I am trying to split them in groups of three, building arrays until I am done running through the numbers. Here is the block diagram. I know you need a for loop to do this, but figuring out a way to utilize it is giving me lots of trouble.
You need the Reshape Array primitive. See image.
The attached image is a PNG VI snippet. Drag it out of your browser onto a block diagram to instantiate the code directly. This snippet works with LV 2015 and earlier (as noted in the image in the upper right corner). You can create snippets for future posts by selecting code on the block diagram and choosing "Edit >> Create VI Snippet From Selection".

Gimp batch create from differing elements

I am trying to create images made up from different elements, some of which are static, some of which are variable.
The endresult should be a set of flyers, made of of a background image, a logo (both static) as well as a QR code and a description of the QR code (text) - both variable.
I do have the background image, logo and QR codes (several dozens) as separate files and am looking for a away to batch create these flyers automatically whereby each QR code is combined wit the background image and the logo (and ideally text as well).
I am well versed with BIMP, however this doesn't allow the option to have certain elements be variables.
Forget Gimp and use ImageMagick's compose utility.
See here.

WPF style info from external text file

Not sure if this is possible, but I have a WPF application that now has a requirement to be skinnable.
Basically, this equates to several key colours and a couple of logos.
Is there any way of grabbing the hex values for the colours in defined styles from an external (ie comes with the application but isn't compiled) text/xml file?
I want to be able to select the colours, create the file and then deploy to the user with the application so that I don't have to maintain multiple versions.
I'm not even sure that this is the best way to achieve what i'm after.
Has anyone done anything akin to this?
I would be extremely grateful if someone could point me in the right direction.
Thanks
just hold the color values in a config file simple text file will suffice.
though you can use VisualStudio Resource file..
file will contain lines in each:
item_enum_name item_type item_value
for example:
main_screen_bg_color Color Black
company_logo URI \logos\logo1.jpg
and so on..
just load the file parse it and use bind to the values...

Get path geometry from image

If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
Yes - I just tackled this problem for an LOB application two days ago.
I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org).
It's opensource, and while it's intended primarily for editing SVG vector-based images, it has two key features that are useful to us WPFers:
It can vectorize (i.e. "trace") raster images like bitmaps and jpegs, albeit not as well as one would hope, and
It can export the vector image as XAML
You'll invariably find that you get better results from loading vector formats (like SVG, EMF, WMF, etc) and saving to XAML, than if you try to convert a bitmap/jpeg... simply because the process of vectorizing a raster image is error prone at best. So if you want to bring a company logo into XAML, try to get hold of the source files used to create the logo (perhaps done in Illustrator?) and import that into InkScape.
If this post is helpful, please be kind and give it a one-up.
Jasema is a terrific tool right for the job.
Also, don't be shy to use Blend - it is somewhat more difficult to use (drawing shapes using pen) but it gets easier pretty fast. Switch on gridlines and optionally snap to them for good results.
What both Jasema and Blend are lacking, is the ability to easily create shapes with a central symmetry (like stars), so I took parts from Jasema and created my own tool (named Radius) that works a bit like a combination of a ruler and compass.
I have a good idea but you're png, bmp, jpg or other non vector file is must be very simple because we need best scan results and only use inkscape.
Step: Drag and drop your file workspace on Inkscape, download free.
Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.
Step: Top menu item Path-> Trace Bitmap-> Mode check what you want property, i usually use color property and if your file is png check Remove Background then click OK, then wait again Ok button is Enable and close window.
Step: Now you have a two layer, top layer vektor file and bottom layer your file. Select vector file and top menu item Edit-> XML Editor-> select svg path and look side column, d name propery in your data path value.
But this method may not always work or may not give the desired results and draw your own shapes with the scape so you can get the path data from the XML editor.
Example, my first tests this like:
and after working on it some more:
I've solved my problem (export an image as XAML) using Microsoft Expression Design 4 (Free Version). I've downloaded from the link
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36180
As input, I had Adobe Ilustrator files.
Adobe Illustrator / CorelDraw is perhaps the best tool out there for these operations that I have used.
Personally, I prefer illustrator for on-screen media. These tracings can be exported into several formats such as EPS, SVG, AI, or even XAML (with this plugin)
Best of Luck !!!!
I have recently been struggling with this myself. I had a set of icons done in data and needed to update them to look nicer.
I tried everything, manually typing them out. drawing in svg, converting svg to xaml.
in the end i found a list of open source icons from google material icons.
I then used this to convert from the svg files to data
https://github.com/BerndK/SvgToXaml
It works well but not for the icons i drew myself.
I decided to place all the icons data i convert into an app i built myself that will give you the data and a preview of the icon. feel free to use and contribute. I will keep updating as much as i can.
https://github.com/sgreaves1/XamlIcons
Convert your image from png to svg in online converter, then drop file into this site http://inloop.github.io/svg2android/ and you will see pathData of your image like below shown in my image.

Resources