+ (NSAttributedString*)attributeString:(NSString*)string color:(NSColor*)color font:(NSFont*)font alignment:(NSTextAlignment)alignment

{

    NSColor *txtColor = color;

    

    NSFont *txtFont = font;

    NSDictionary *txtDict = [NSDictionary dictionaryWithObjectsAndKeys:

                             txtFont, NSFontAttributeName, txtColor, NSForegroundColorAttributeName, nil];

    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc]

                                          initWithString:string attributes:txtDict] ;

    [attrStr setAlignment:alignment range:NSMakeRange(0, attrStr.length)];

    

    

    return attrStr ;

    

}