the best way to handle dark mode logos in html emails - html-email

am designing a html email template that supports dark mode for all email clients but am facing a problem with the logo.
The logo is a black .png image and the default/light background is white, so in dark mode it becomes black over black. Adding an outline to the logo is not an option, using 2 images with classes and controlling which one to display using media queries won't work for Gmail ios and some outlook versions, so am left with three choices but am not sure wither they are applicable and supported by all famous clients:
forcing the white background by using a gradient as the background-color value instead of a hex value
using this method that I found online for webpages:
<picture>
<source srcset="dark-mode.png" media="(prefers-color-scheme: dark)">
<img src="light-image.png">
</picture>
using an SVG instead of the image so the fill color will change.
So, are any of them is applicable and supported?
Also, more suggestions/ideas/options are appreciated.

Support for SVG is quite limited so unfortunately that's not an option: https://www.caniemail.com/features/image-svg/
#media prefers-color-scheme: dark is not supported on Gmail/some Outlooks, so that's not going to work. https://www.caniemail.com/features/css-at-media-prefers-color-scheme/
Using a gradient to force unchanging background is not ideal (we should be supporting customer's preferences), and also not 100% cross-compatible. (background-image: linear-gradient(#ffffff,#ffffff);)
If a 1px white stroke is no good for you, you could try a soft glow like Litmus do.
Alternatively, sometimes we just end up putting a single-colour background in the image itself (i.e. getting rid of the transparency), perhaps with rounded corners (a tiny bit of transparency on the corners). Works best for icons, but might be your only option.

Related

How to know the background color of Pdf

Sometimes pdf might have a transparent background. And In my application I have given a option to choose background. So, in case of pdf with transparent background and background color black all things becomes black black so, any way to check or any key inside dictionary of pdf page that can help me? Any help will appreciated.
The easiest solution for you would be to remove black color from available background colors.
Generally, all pdf pages have transparent background and the white background color is set by the viewer application. It is possible to set a background color for each page. You can read all about it in Page Group under Transparency section of the PDF Reference.
It is also possible to show a background color for a page by setting 'BoxColorInfo' dictionary in the page dictionary with appropriate values.
But I am not sure what you can achieve by knowing what color a page background is, since black background is going to be a problem for PDFs with transparent pages anyways.
EDIT: Following is the paragraph from PDFReference i was trying to point you to:
Ordinarily, the page is imposed directly on an output medium, such as
paper or a display screen. The page group is treated as an isolated
group, whose results are then composited with a backdrop color
appropriate for the medium. The backdrop is nominally white, although
varying according to the actual properties of the medium. However,
some applications may choose to provide a different backdrop, such as
a checkerboard or grid to aid in visualizing the effects of
transparency in the artwork.
It says that most PDFs would have a transparent and it is your application which shows the background color. Hope this helps.

Is there any pre-built sample of iphone like bottom navigation using CSS 3?

Is there any pre-built sample of iphone like bottom navigation using CSS 3? is it possible to make these icons in CSS3, without images?
You may want to check out Sencha Touch, they provide a full HTML5 version of many common UI components for mobile web site development, including tab bars.
Try my itabbar www.itabbar.com
Here a full css tabbar with jquery to change button color on click
http://jsfiddle.net/onigetoc/4CgxM/ (View on Chrome or Safari)
I think this is possible to reproduce the basic icon with basic shapes in css
For the moment I havec make the most basic look hat http://frommelt.fr/exos/icon.html
Of curse I don't lets go and I will make the other :)
Actually, in ChocolateChip-UI we use SVG images as background image masks and CSS3 background gradients to exactly recreate the iPhone toolbar icons. Webkit background image masks with with background images and background colors. Since CSS3 gradients are rendered by the browser as a canvas background image, they work just fine. The svg images are just black and transparent because they were created to use as masks with background colors.
That said, yes you could reproduce the images with just HTML elements and CSS. It would require a bunch of pieces, using a mix of relative and absolute positioning and would be very, very tedious to get all the pieces positioned properly and get the background gradients to match up perfectly. And then you would have to write some really complicated CSS to handle the hover state. I could do that but would I want to? Hell no! Using the SVG image masks is just so much easier. And because the SVG is just text, it's easy to edit them at any time. Oh yeah, and SVG is vector-based so you can scale them to any size without pixelation.

iPhone, what background colors should I use for a personal finance app?

I know this question might be considered better on Stack UI, but I wanted some opinions from fellow app developers.
I've designed my app with black opaque navigation bars, and dark colored backgrounds. I've produced some radial gradient backgrounds in my paint program. I have three different images (plus a second set for retina). One has a dark green to black gradient, another dark yellow to black and a dark blue to black gradient.
So my app looks quite dark.
I didn't think this was a problem.
However me colleague thinks this is a very bad idea, that it will make people think their money will disappear into a black hole.
I'd like to use different colors backgrounds as I have one view I use in edit and add mode, to differentiate them. Also it makes each screen more distinctive.
I've also had a look round to see if you can buy sets of backgrounds, but I've only seen wallpaper sites for users to use.
I want to make my app seem cool, thats why I've gone for a dark scheme. But I'm now a little worried that it will affect sales.
I'd like some opinions please. I don't really want to post any of my screens as I haven't released my app / idea yet.
See http://www.noupe.com/showcases/showcase-well-designed-banking-and-investment-websites.html
IMO, Go with light Grey
#eee
Also see http://www.mybanktracker.com/
I would agree that a dark scheme probably isn't the best but have you looked at other apps? Mint uses a nice contrast of dark headers with white (or light) content areas. They even have a nice textured background if you drill to the transaction view. I'm using a very light green in an app I'm working on that could go really well with dark nav bars and a dark green-ish/black font. It could at least be a nice background color bumping up against dark borders.
[UIColor colorWithRed:196/255.0 green:218/255.0 blue:173/255.0 alpha:1.0]
However, I will say that it's difficult to recommend a color scheme without seeing what kind of ui you're dealing with (how many elements and of what type, etc).
good luck...
I think using the banks colours is best for brand recognition, the National Bank iBank app does this well.

Convert an image to an iPhone toolbar icon

I have a grayscale icon that I'm editing with Photoshop with a transparent background, but I can't, for the life of me, figure out how to convert the icon to one that can be used as an iPhone toolbar icon. If I simply save the image as a PNG, it doesn't show up as anti-aliased on the iPhone because every pixel with color is being rendered as black, instead of a shade of gray.
According to the Apple docs and other sources, there needs to be an alpha channel on the image to specify varying levels of transparency for each pixel. However, I have no idea what that means. I've read these posts and docs from Adobe and I still can't figure out how to properly convert a grayscale image into one that can be used as an iPhone toolbar icon. The blog post is hard to comprehend and poorly written, and the Adobe docs don't really help.
http://cahit.hayalet.net/blog/514/converting-an-image-to-iphone-toolbar-icon/
http://livedocs.adobe.com/en_US/Photoshop/10.0/help.html?content=WS74B356C9-353F-4483-8632-7B1A102F2A2E.html
Can someone point me in the right direction or provide exact, step-by-step directions to doing this in Photoshop?
It's much more simple than having to muck with actual masks in Photoshop.
iPhone toolbar icons are about 30px by 30px, so make a new Photoshop file with those dimensions. Ensure the background is transparent (you can specify that when creating a new file).
Then, any pixels you draw on top of this transparency become what iOS uses for the icon. Doesn't matter what color it is in Photoshop for NSToolbar icons -- they're automatically used as masks by iOS.
Leave transparent the parts you want to show through. Save as 24-bit PNG, and chuck into XCode as usual.
For a few icons that serve as good starting examples, check out the ones I publish for free here: http://glyphish.com Just take one of the PNGs and open it in Photoshop and you'll see that it's drawn in an arbitrary color (#444444) with varying levels of opacity to create darker and lighter parts of the icon.
This is more of a photoshop question than coding but anyway, here's a suggestion.
Lunacore has a good tutorial on how to use masks.
What you want to do is:
Make sure you're background is transparent.
Create a new layer and
fill it with any solid color.
Create a mask on the solid color
layer, and fill your greyscale image into the mask. (Use your
greyscale image as the mask.)
Toolbar icons use your image as a mask. They only consider what transparancy the image has. Not what color or shade.

Generating icons for iPhone UITabBar

I’ve been busy working on the graphics for my iPhone application. I started working on generating icons for my UITabBar and ran into lots of problems. How do you create these icons?
I created this solution:
http://www.nailrails.com/?p=46
Are there any shortcomings to this approach? It seemed to work for the few icons I created...
Apple's guidelines can be found at http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref/doc/uid/TP40006556-CH14-SW1
The docs are pretty straightforward-- alpha is all that matters when the image gets loaded by the toolbar, meaning that anything that's not at least semitransparent will render in the same opaque shade. As for how I do that, I mainly use Adobe tools. Fireworks is my preferred tool but Photoshop's also more than up to it. Another one I've had good results with is Acorn, which is frankly a lot cheaper while being more than sophisticated enough for this kind of work. I'm not really a graphic designer but a certain familiarity with this kind of stuff goes with the job.
I have an article up on my site that shows how to use OmniGraffle with a template I use to create great iPhone toolbar icons in minutes:
http://steveweller.com/articles/toolbar-icons/
The template sets up a grid to work to that corresponds to one square for each pixel. You draw your icon in white on top of the black template background and then export as a PDF exactly the right area to match the icon size you need (typically 21 pixels high). Then you reimport the PDF, resize it to the final icon size (21 pixels again), and export as PNG. The template does nothing magical; it just provides an already set up working area and helps you get the final PNG right every time to the scale is correct.
You could use the same technique in Acorn or any other app that supports PDF export and layers.
(I use Gimp. Assume your icon layer already has alpha channel.)
Right click the layer, then add layer mask.
Done with option "transfer alpha channel of layer" chosen.
Select the whole layer (but not layer mask), and clear it with pure white.
Resize image to Apple-suggested size, and export it as png file.
You may also paint directly on the layer mask.