Dave Ramsey meets Personal Finance

I really want to help make Personal Finance simple for people to apply to their own lives. But the problem is that once you try to whittle the advice down into a pithy, step-by-step list, you’ve lost all of the nuance of a solution. The flowchart I’ve attached to this blogpost is from Reddit’s r/personalfinance wiki, and does the best job I’ve seen in trying to put this complicated process into something visual that’s easier to understand. The flowchart recommends that you continue to put money into retirement while you pay of “consumer debt”, which is in conflict with Dave Ramsey’s advice to temporarily put that on hold. Otherwise, there are quite a few similarities between the two methods.

I primarily used the Dave Ramsey method to get our household out of about $90,000 in debt, over the course of about 3.5 years. It also helped tremendously to build in a few YNAB (you need a budget) methods along the way, allowing us to pay for next month’s expenses using this month’s income. We also started putting all of our expenses on a single credit card, paying off in full every month, but continuing to budget and account for all of our expenses. This allowed us an additional emergency float, in case we needed it, as well as additional credit card rewards, etc.

Again–this is in conflict with the Ramsey method. We did utilize the ramsey method immediately, but once we got our budget under control, we added them back in when we could do so safely. Ramsey contends that “the only thing you can do with credit is go back into debt”, but that’s not really the whole truth. There are a variety of things in this world that rely on good credit, including getting a good rate on your insurance. So I believe there is a way to enjoy credit responsibly once you know you can trust yourself.

The path to solid finances is a long and hard road, and there are pieces of different programs that will work for some and not for others–and I am more than happy to help families figure out what will work for them.

AMPScript: Contrasting Font color

Hello AMPScript lovers!

The challenge: I have a report that I run for clients at Clarus Group, and I want the report to use the primary color associated with the client’s brand.  The same report is in use across all clients, so I want the code to be adaptable, based on the parameters that I enter.  In this case, I use the client’s primary color as the background color for my header rows.

This can have some readability challenges, depending on what color the clients use.

The resolution: In order to solve this, I built out AMPScript that will ask for a client’s color code, and then convert their color code from the Hex value into an RGB Value, and then convert all of the data into an Intensity value.  From there, we can choose a dividing line that will automatically apply a White or Black Foreground font color, depending on that intensity, so it will always be automatically readable.

The values used and the idea were generated from an amazing stack overflow post here.

The outcome: Now, if there’s a light background, it chooses black font, and if there’s a dark background, it chooses a white font–automatically!


The Code:

%%[/* Modify to view AMPScript
<div style="display: none;">*/
var @Hex, @HexR1, @HexR2, @HexG1, @HexG2, @HexB1, @HexB2, @R1, @R2, @G1, @G2, @B1, @B2, @RIntensity, @GIntensity, @BIntensity, @RValue, @RGValue, @GValue, @BValue, @FontColor/* Be sure to use leading # in hex value */
set @Hex = "#A2F458"/* Split apart the 6 characters into their respective values */set @HexR1 = Substring(@Hex,2,1)
set @HexR2 = Substring(@Hex,3,1)
set @HexG1 = Substring(@Hex,4,1)
set @HexG2 = Substring(@Hex,5,1)
set @HexB1 = Substring(@Hex,6,1)
set @HexB2 = Substring(@Hex,7,1)/* Convert Hex value to decimal */
if @HexR1 == "A" then
set @HexR1 = 10
elseif @HexR1 =="B"
then set @HexR1 = 11
elseif @HexR1 =="C"
then set @HexR1 = 12
elseif @HexR1 =="D"
then set @HexR1 = 13
elseif @HexR1 =="E"
then set @HexR1 =14
elseif @HexR1 =="F"
then set @HexR1 = 15

set @R1 = Multiply(@HexR1,16)

/* Repeat for each substring */

if @HexR2 == "A" then
set @HexR2 = 10
elseif @HexR2 =="B"
then set @HexR2 = 11
elseif @HexR2 =="C"
then set @HexR2 = 12
elseif @HexR2 =="D"
then set @HexR2 = 13
elseif @HexR2 =="E"
then set @HexR2 =14
elseif @HexR2 =="F"
then set @HexR2 = 15

set @R2 = Multiply(@HexR2,16)

/* Repeat for each substring */

if @HexG1 == "A" then
set @HexG1 = 10
elseif @HexG1 =="B"
then set @HexG1 = 11
elseif @HexG1 =="C"
then set @HexG1 = 12
elseif @HexG1 =="D"
then set @HexG1 = 13
elseif @HexG1 =="E"
then set @HexG1 =14
elseif @HexG1 =="F"
then set @HexG1 = 15

set @G1 = Multiply(@HexG1,16)

/* Repeat for each substring */

if @HexG2 == "A" then
set @HexG2 = 10
elseif @HexG2 =="B"
then set @HexG2 = 11
elseif @HexG2 =="C"
then set @HexG2 = 12
elseif @HexG2 =="D"
then set @HexG2 = 13
elseif @HexG2 =="E"
then set @HexG2 =14
elseif @HexG2 =="F"
then set @HexG2 = 15

set @G2 = Multiply(@HexG2,16)

/* Repeat for each substring */

if @HexB1 == "A" then
set @HexB1 = 10
elseif @HexB1 =="B"
then set @HexB1 = 11
elseif @HexB1 =="C"
then set @HexB1 = 12
elseif @HexB1 =="D"
then set @HexB1 = 13
elseif @HexB1 =="E"
then set @HexB1 =14
elseif @HexB1 =="F"
then set @HexB1 = 15

set @B1 = Multiply(@HexB1,16)

/* Repeat for each substring */

if @HexB2 == "A" then
set @HexB2 = 10
elseif @HexB2 =="B"
then set @HexB2 = 11
elseif @HexB2 =="C"
then set @HexB2 = 12
elseif @HexB2 =="D"
then set @HexB2 = 13
elseif @HexB2 =="E"
then set @HexB2 =14
elseif @HexB2 =="F"
then set @HexB2 = 15

set @B2 = Multiply(@HexB2,16)

/* Add the two substrings together for Red, Greeen, and Blue */

Set @RIntensity = ADD(@R1,@R2)
Set @GIntensity = ADD(@G1,@G2)
Set @BIntensity = ADD(@B1,@B2)

/* Convert the Individual intensities into a single intensity */

Set @RValue = Multiply(@RIntensity,0.299)
Set @GValue = Multiply(@GIntensity,0.587)
Set @BValue = Multiply(@BIntensity,0.114)
Set @RGValue = ADD(@RValue,@GValue)
Set @RGBIntensity = ADD(@RGValue,@BValue)

/* If the intensity is greater than 186, use black font, otherwise, use white. */

Set @FontColor = "#ffffff"
IF @RGBIntensity &gt; 186
THEN SET @FontColor = "#000000"


*/ ]%%



Aaron is our SFMC Consultant and we could not be running such sophisticated campaigns without him. He responds quickly, works under tight deadlines, and is a pleasure to have as part of our team. He keeps us up to speed on exactly how everything works, and is comfortable working independently with little guidance from us. We recommend Aaron very highly!

–Kirby, lofty.com



The folks at teespring contacted me to work through some complex AMPScripting needs.  As it turned out, their marketing team was targeting specific audiences with some email content–but it was taking a great deal of time to build the audience each time, build the current collections that were available at the time of send, and build the email.

I was able to jump in and utilize their current product feed and sales information, and combine them to determine any subscriber’s preferences based on past purchase history.  Then I could use this in combination with AMPScript within the email to get each subscriber the best selling t-shirts, but only for the category of shirts that they are most interested in.

The email was smart enough to show best sellers when there weren’t dynamic favorites available.  The team was very happy with this work, and it has increased revenue, and dramatically reduced their time working on similar emails–as it’s completely automated.